Files
docker-agent/pkg/memory/database/database.go
T
David Gageot 5d1441a1af Format code
Signed-off-by: David Gageot <david.gageot@docker.com>
2025-07-18 13:37:26 +02:00

27 lines
592 B
Go

package database
import (
"context"
"errors"
)
var ErrEmptyID = errors.New("memory ID cannot be empty")
type UserMemory struct {
ID string
CreatedAt string
Memory string
}
type Memory interface {
AddMemory(ctx context.Context, memory UserMemory) error
GetMemories(ctx context.Context) ([]UserMemory, error)
DeleteMemory(ctx context.Context, memory UserMemory) error
}
type Database interface {
AddMemory(ctx context.Context, memory UserMemory) error
GetMemories(ctx context.Context) ([]UserMemory, error)
DeleteMemory(ctx context.Context, memory UserMemory) error
}