2022-09-27 17:59:05 +08:00
|
|
|
package search_common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2022-10-24 16:51:05 +08:00
|
|
|
"github.com/answerdev/answer/internal/schema"
|
2022-09-27 17:59:05 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type SearchRepo interface {
|
2022-10-09 18:44:56 +08:00
|
|
|
SearchContents(ctx context.Context, words []string, tagID, userID string, votes, page, size int, order string) (resp []schema.SearchResp, total int64, err error)
|
|
|
|
SearchQuestions(ctx context.Context, words []string, limitNoAccepted bool, answers, page, size int, order string) (resp []schema.SearchResp, total int64, err error)
|
|
|
|
SearchAnswers(ctx context.Context, words []string, limitAccepted bool, questionID string, page, size int, order string) (resp []schema.SearchResp, total int64, err error)
|
2022-09-27 17:59:05 +08:00
|
|
|
}
|