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-11-14 18:47:22 +08:00
|
|
|
SearchContents(ctx context.Context, words []string, tagIDs []string, userID string, votes, page, size int, order string) (resp []schema.SearchResp, total int64, err error)
|
|
|
|
SearchQuestions(ctx context.Context, words []string, notAccepted bool, views, answers int, page, size int, order string) (resp []schema.SearchResp, total int64, err error)
|
|
|
|
SearchAnswers(ctx context.Context, words []string, tagIDs []string, accepted bool, questionID string, page, size int, order string) (resp []schema.SearchResp, total int64, err error)
|
2022-09-27 17:59:05 +08:00
|
|
|
}
|