Documentation
¶
Index ¶
- func NewDebugContextRepo(idgen idgen.IIDGenerator, debugContextDao mysql.IDebugContextDAO) repo.IDebugContextRepo
- func NewDebugLogRepo(idgen idgen.IIDGenerator, debugLogDao mysql.IDebugLogDAO) repo.IDebugLogRepo
- func NewLabelRepo(db db.Provider, idgen idgen.IIDGenerator, meter metrics.Meter, ...) repo.ILabelRepo
- func NewManageRepo(db db.Provider, idgen idgen.IIDGenerator, meter metrics.Meter, ...) repo.IManageRepo
- type DebugContextRepoImpl
- type DebugLogRepoImpl
- type LabelRepoImpl
- func (r *LabelRepoImpl) BatchGetLabel(ctx context.Context, spaceID int64, labelKeys []string) (labelDOs []*entity.PromptLabel, err error)
- func (r *LabelRepoImpl) BatchGetPromptVersionByLabel(ctx context.Context, queries []repo.PromptLabelQuery, ...) (map[repo.PromptLabelQuery]string, error)
- func (r *LabelRepoImpl) CreateLabel(ctx context.Context, labelDO *entity.PromptLabel) error
- func (r *LabelRepoImpl) GetCommitLabels(ctx context.Context, promptID int64, commitVersions []string) (map[string][]*entity.PromptLabel, error)
- func (r *LabelRepoImpl) ListLabel(ctx context.Context, param repo.ListLabelParam) ([]*entity.PromptLabel, *int64, error)
- func (r *LabelRepoImpl) UpdateCommitLabels(ctx context.Context, param repo.UpdateCommitLabelsParam) error
- type ManageRepoImpl
- func (d *ManageRepoImpl) CommitDraft(ctx context.Context, param repo.CommitDraftParam) (err error)
- func (d *ManageRepoImpl) CreatePrompt(ctx context.Context, promptDO *entity.Prompt) (promptID int64, err error)
- func (d *ManageRepoImpl) DeletePrompt(ctx context.Context, promptID int64) (err error)
- func (d *ManageRepoImpl) GetPrompt(ctx context.Context, param repo.GetPromptParam) (promptDO *entity.Prompt, err error)
- func (d *ManageRepoImpl) ListCommitInfo(ctx context.Context, param repo.ListCommitInfoParam) (result *repo.ListCommitResult, err error)
- func (d *ManageRepoImpl) ListPrompt(ctx context.Context, param repo.ListPromptParam) (result *repo.ListPromptResult, err error)
- func (d *ManageRepoImpl) MGetPrompt(ctx context.Context, queries []repo.GetPromptParam, ...) (promptDOMap map[repo.GetPromptParam]*entity.Prompt, err error)
- func (d *ManageRepoImpl) MGetPromptBasicByPromptKey(ctx context.Context, spaceID int64, promptKeys []string, ...) (promptDOs []*entity.Prompt, err error)
- func (d *ManageRepoImpl) SaveDraft(ctx context.Context, promptDO *entity.Prompt) (draftInfo *entity.DraftInfo, err error)
- func (d *ManageRepoImpl) UpdatePrompt(ctx context.Context, param repo.UpdatePromptParam) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDebugContextRepo ¶
func NewDebugContextRepo( idgen idgen.IIDGenerator, debugContextDao mysql.IDebugContextDAO, ) repo.IDebugContextRepo
func NewDebugLogRepo ¶
func NewDebugLogRepo( idgen idgen.IIDGenerator, debugLogDao mysql.IDebugLogDAO, ) repo.IDebugLogRepo
func NewLabelRepo ¶
func NewLabelRepo( db db.Provider, idgen idgen.IIDGenerator, meter metrics.Meter, labelDAO mysql.ILabelDAO, commitLabelMappingDAO mysql.ICommitLabelMappingDAO, promptBasicDAO mysql.IPromptBasicDAO, promptLabelVersionDAO redis.IPromptLabelVersionDAO, ) repo.ILabelRepo
func NewManageRepo ¶
func NewManageRepo( db db.Provider, idgen idgen.IIDGenerator, meter metrics.Meter, promptBasicDao mysql.IPromptBasicDAO, promptCommitDao mysql.IPromptCommitDAO, promptDraftDao mysql.IPromptUserDraftDAO, commitLabelMappingDAO mysql.ICommitLabelMappingDAO, promptBasicCacheDAO redis.IPromptBasicDAO, promptCacheDAO redis.IPromptDAO, ) repo.IManageRepo
Types ¶
type DebugContextRepoImpl ¶
type DebugContextRepoImpl struct {
// contains filtered or unexported fields
}
func (*DebugContextRepoImpl) GetDebugContext ¶
func (d *DebugContextRepoImpl) GetDebugContext(ctx context.Context, promptID int64, userID string) (*entity.DebugContext, error)
func (*DebugContextRepoImpl) SaveDebugContext ¶
func (d *DebugContextRepoImpl) SaveDebugContext(ctx context.Context, debugContext *entity.DebugContext) error
type DebugLogRepoImpl ¶
type DebugLogRepoImpl struct {
// contains filtered or unexported fields
}
func (*DebugLogRepoImpl) ListDebugHistory ¶
func (d *DebugLogRepoImpl) ListDebugHistory(ctx context.Context, param repo.ListDebugHistoryParam) (r *repo.ListDebugHistoryResult, err error)
func (*DebugLogRepoImpl) SaveDebugLog ¶
type LabelRepoImpl ¶
type LabelRepoImpl struct {
// contains filtered or unexported fields
}
func (*LabelRepoImpl) BatchGetLabel ¶
func (r *LabelRepoImpl) BatchGetLabel(ctx context.Context, spaceID int64, labelKeys []string) (labelDOs []*entity.PromptLabel, err error)
func (*LabelRepoImpl) BatchGetPromptVersionByLabel ¶
func (r *LabelRepoImpl) BatchGetPromptVersionByLabel(ctx context.Context, queries []repo.PromptLabelQuery, opts ...repo.GetLabelMappingOptionFunc) (map[repo.PromptLabelQuery]string, error)
func (*LabelRepoImpl) CreateLabel ¶
func (r *LabelRepoImpl) CreateLabel(ctx context.Context, labelDO *entity.PromptLabel) error
func (*LabelRepoImpl) GetCommitLabels ¶
func (r *LabelRepoImpl) GetCommitLabels(ctx context.Context, promptID int64, commitVersions []string) (map[string][]*entity.PromptLabel, error)
func (*LabelRepoImpl) ListLabel ¶
func (r *LabelRepoImpl) ListLabel(ctx context.Context, param repo.ListLabelParam) ([]*entity.PromptLabel, *int64, error)
func (*LabelRepoImpl) UpdateCommitLabels ¶
func (r *LabelRepoImpl) UpdateCommitLabels(ctx context.Context, param repo.UpdateCommitLabelsParam) error
type ManageRepoImpl ¶
type ManageRepoImpl struct {
// contains filtered or unexported fields
}
func (*ManageRepoImpl) CommitDraft ¶
func (d *ManageRepoImpl) CommitDraft(ctx context.Context, param repo.CommitDraftParam) (err error)
func (*ManageRepoImpl) CreatePrompt ¶
func (*ManageRepoImpl) DeletePrompt ¶
func (d *ManageRepoImpl) DeletePrompt(ctx context.Context, promptID int64) (err error)
func (*ManageRepoImpl) GetPrompt ¶
func (d *ManageRepoImpl) GetPrompt(ctx context.Context, param repo.GetPromptParam) (promptDO *entity.Prompt, err error)
func (*ManageRepoImpl) ListCommitInfo ¶
func (d *ManageRepoImpl) ListCommitInfo(ctx context.Context, param repo.ListCommitInfoParam) (result *repo.ListCommitResult, err error)
func (*ManageRepoImpl) ListPrompt ¶
func (d *ManageRepoImpl) ListPrompt(ctx context.Context, param repo.ListPromptParam) (result *repo.ListPromptResult, err error)
func (*ManageRepoImpl) MGetPrompt ¶
func (d *ManageRepoImpl) MGetPrompt(ctx context.Context, queries []repo.GetPromptParam, opts ...repo.GetPromptOptionFunc) (promptDOMap map[repo.GetPromptParam]*entity.Prompt, err error)
func (*ManageRepoImpl) MGetPromptBasicByPromptKey ¶
func (d *ManageRepoImpl) MGetPromptBasicByPromptKey(ctx context.Context, spaceID int64, promptKeys []string, opts ...repo.GetPromptBasicOptionFunc) (promptDOs []*entity.Prompt, err error)
func (*ManageRepoImpl) UpdatePrompt ¶
func (d *ManageRepoImpl) UpdatePrompt(ctx context.Context, param repo.UpdatePromptParam) (err error)
Click to show internal directories.
Click to hide internal directories.