Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IdCursorType = (*IdCursor)(nil) ScoreCursorType = (*ScoreCursor)(nil) )
Functions ¶
This section is empty.
Types ¶
type EsCursor ¶
type EsCursor interface {
MakeSortOptions(backward bool) ([]types.SortCombinations, []types.FieldValue, error)
}
type EsPaginator ¶
type EsPaginator struct {
// contains filtered or unexported fields
}
func NewEsPaginator ¶
func NewEsPaginator(store pagination.Store, opts *pagination.PaginationOptions) *EsPaginator
func (*EsPaginator) MakeSortOptions ¶
func (p *EsPaginator) MakeSortOptions(ctx context.Context) ([]types.SortCombinations, []types.FieldValue, error)
MakeSortOptions 生成ID分页查询选项
func (*EsPaginator) StoreCursor ¶
func (p *EsPaginator) StoreCursor(ctx context.Context, first, last any) error
func (*EsPaginator) StoreStringCursor ¶
func (p *EsPaginator) StoreStringCursor(ctx context.Context, first, last any) error
type IdCursor ¶
type IdCursor struct {
ID string `json:"_id"`
}
func (*IdCursor) MakeSortOptions ¶
func (s *IdCursor) MakeSortOptions(backward bool) ([]types.SortCombinations, []types.FieldValue, error)
type ScoreCursor ¶
func (*ScoreCursor) MakeSortOptions ¶
func (s *ScoreCursor) MakeSortOptions(backward bool) ([]types.SortCombinations, []types.FieldValue, error)
Click to show internal directories.
Click to hide internal directories.