mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-06 15:07:58 +00:00
21 lines
524 B
Go
21 lines
524 B
Go
package database
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
)
|
|
|
|
var ErrEmptyID = errors.New("memory ID cannot be empty")
|
|
|
|
type UserMemory struct {
|
|
ID string `description:"The ID of the memory"`
|
|
CreatedAt string `description:"The creation timestamp of the memory"`
|
|
Memory string `description:"The content of the memory"`
|
|
}
|
|
|
|
type Database interface {
|
|
AddMemory(ctx context.Context, memory UserMemory) error
|
|
GetMemories(ctx context.Context) ([]UserMemory, error)
|
|
DeleteMemory(ctx context.Context, memory UserMemory) error
|
|
}
|