memory

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID      string   `json:"ID"`
	Content string   `json:"Content"`
	Tags    []string `json:"Tags"`
}

type LocalMap

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

func NewLocalMap

func NewLocalMap() *LocalMap

func (*LocalMap) Delete

func (m *LocalMap) Delete(ctx context.Context, id string) error

func (*LocalMap) Recent

func (m *LocalMap) Recent(ctx context.Context, n int) ([]Item, error)

func (*LocalMap) Search

func (m *LocalMap) Search(ctx context.Context, query string) ([]Item, error)

func (*LocalMap) Store

func (m *LocalMap) Store(ctx context.Context, item Item) error

type Log

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

Log is an off-by-default file of turns. The process still answers from memory after load.

func NewLog

func NewLog(path string) (*Log, error)

func (*Log) Delete

func (l *Log) Delete(ctx context.Context, id string) error

func (*Log) Recent

func (l *Log) Recent(ctx context.Context, n int) ([]Item, error)

func (*Log) Search

func (l *Log) Search(ctx context.Context, query string) ([]Item, error)

func (*Log) Store

func (l *Log) Store(ctx context.Context, item Item) error

Jump to

Keyboard shortcuts

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