repository

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package repository 提供 agent 域各持久化端口的基于数据库(GORM)的实现。

架构说明:

  • 持久化端口(TaskRepository / PermissionRepository / QuestionRepository / MemoryRepository / ProfileRepository / SessionStore / MessageStore / HistoryStore) 统一定义在 internal/agent/types/interface 中;领域实体在 internal/agent/types。
  • 本包作为适配器层,把这些端口的实现落到数据库,单向依赖 types 与 types/interface, 不反向依赖 application/service,从而避免循环依赖。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGormHistoryStore

func NewGormHistoryStore(db *gorm.DB) agentinterfaces.HistoryStore

NewGormHistoryStore 创建基于数据库的文件历史 Store。

func NewGormMemoryRepository

func NewGormMemoryRepository(db *gorm.DB) agentinterfaces.MemoryRepository

NewGormMemoryRepository 创建基于数据库的记忆 Repository。

func NewGormMessageStore

func NewGormMessageStore(db *gorm.DB) agentinterfaces.MessageStore

NewGormMessageStore 创建基于数据库的消息 Store。

func NewGormPermissionRepository

func NewGormPermissionRepository(db *gorm.DB) agentinterfaces.PermissionRepository

NewGormPermissionRepository 创建基于数据库的权限请求 Repository。

func NewGormProfileRepository

func NewGormProfileRepository(db *gorm.DB) agentinterfaces.ProfileRepository

NewGormProfileRepository 创建基于数据库的 Profile Repository。

func NewGormQuestionRepository

func NewGormQuestionRepository(db *gorm.DB) agentinterfaces.QuestionRepository

NewGormQuestionRepository 创建基于数据库的提问请求 Repository。

func NewGormSessionStore

func NewGormSessionStore(db *gorm.DB) agentinterfaces.SessionStore

NewGormSessionStore 创建基于数据库的会话 Store。

func NewGormTaskRepository

func NewGormTaskRepository(db *gorm.DB) agentinterfaces.TaskRepository

NewGormTaskRepository 创建基于数据库的任务 Repository。

Types

This section is empty.

Jump to

Keyboard shortcuts

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