Help us shape the future of Go! Take the 2026 Go Developer Survey

database

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyID        = errors.New("memory ID cannot be empty")
	ErrMemoryNotFound = errors.New("memory not found")
)

Functions

This section is empty.

Types

type Database

type Database interface {
	AddMemory(ctx context.Context, memory UserMemory) error
	GetMemories(ctx context.Context) ([]UserMemory, error)
	DeleteMemory(ctx context.Context, memory UserMemory) error
	SearchMemories(ctx context.Context, query, category string) ([]UserMemory, error)
	UpdateMemory(ctx context.Context, memory UserMemory) error
}

type UserMemory

type UserMemory struct {
	ID        string `json:"id" description:"The ID of the memory"`
	CreatedAt string `json:"created_at" description:"The creation timestamp of the memory"`
	Memory    string `json:"memory" description:"The content of the memory"`
	Category  string `json:"category,omitempty" description:"The category of the memory"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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