repo

package
v0.0.0-...-d027d8b Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

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

func (d *DebugLogRepoImpl) SaveDebugLog(ctx context.Context, debugLog *entity.DebugLog) (err error)

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 (d *ManageRepoImpl) CreatePrompt(ctx context.Context, promptDO *entity.Prompt) (promptID int64, err error)

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) SaveDraft

func (d *ManageRepoImpl) SaveDraft(ctx context.Context, promptDO *entity.Prompt) (draftInfo *entity.DraftInfo, err error)

func (*ManageRepoImpl) UpdatePrompt

func (d *ManageRepoImpl) UpdatePrompt(ctx context.Context, param repo.UpdatePromptParam) (err error)

Directories

Path Synopsis
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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