Documentation ¶
Index ¶
- Variables
- type CreateAtAscCursor
- type CreateAtDescCursor
- type IdCursor
- type MongoCursor
- type MongoPaginator
- func (p *MongoPaginator) MakeSortOptions(ctx context.Context, filter bson.M) (bson.M, error)
- func (p *MongoPaginator) StoreCursor(ctx context.Context, first, last any) error
- func (p *MongoPaginator) StoreStringCursor(ctx context.Context, first, last any) error
- func (p *MongoPaginator) StoreTimeCursor(ctx context.Context, first, last any) error
- type NameAscCursor
- type NameDescCursor
- type TypeAscCursor
- type TypeDescCursor
- type UpdateAtAscCursor
- type UpdateAtDescCursor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IdCursorType = (*IdCursor)(nil) CreateAtDescCursorType = (*CreateAtDescCursor)(nil) CreateAtAscCursorType = (*CreateAtAscCursor)(nil) UpdateAtDescCursorType = (*UpdateAtDescCursor)(nil) UpdateAtAscCursorType = (*UpdateAtAscCursor)(nil) NameDescCursorType = (*NameDescCursor)(nil) NameAscCursorType = (*NameAscCursor)(nil) TypeDescCursorType = (*TypeDescCursor)(nil) TypeAscCursorType = (*TypeAscCursor)(nil) )
Functions ¶
This section is empty.
Types ¶
type CreateAtAscCursor ¶
type CreateAtAscCursor struct {
ID string `json:"_id"`
}
func (*CreateAtAscCursor) MakeSortOptions ¶
type CreateAtDescCursor ¶
type CreateAtDescCursor struct {
ID string `json:"_id"`
}
func (*CreateAtDescCursor) MakeSortOptions ¶
降序
type MongoCursor ¶
type MongoPaginator ¶
type MongoPaginator struct {
// contains filtered or unexported fields
}
func NewMongoPaginator ¶
func NewMongoPaginator(store pagination.Store, opts *pagination.PaginationOptions) *MongoPaginator
func (*MongoPaginator) MakeSortOptions ¶
MakeSortOptions 生成ID分页查询选项,并将filter在原地更新
func (*MongoPaginator) StoreCursor ¶
func (p *MongoPaginator) StoreCursor(ctx context.Context, first, last any) error
func (*MongoPaginator) StoreStringCursor ¶
func (p *MongoPaginator) StoreStringCursor(ctx context.Context, first, last any) error
func (*MongoPaginator) StoreTimeCursor ¶
func (p *MongoPaginator) StoreTimeCursor(ctx context.Context, first, last any) error
type NameAscCursor ¶
type NameAscCursor struct {
Name string `json:"name"`
}
func (*NameAscCursor) MakeSortOptions ¶
type NameDescCursor ¶
type NameDescCursor struct {
Name string `json:"name"`
}
func (*NameDescCursor) MakeSortOptions ¶
type TypeAscCursor ¶
type TypeAscCursor struct {
Type string `json:"type"`
}
func (*TypeAscCursor) MakeSortOptions ¶
type TypeDescCursor ¶
type TypeDescCursor struct {
Type string `json:"type"`
}
func (*TypeDescCursor) MakeSortOptions ¶
type UpdateAtAscCursor ¶
func (*UpdateAtAscCursor) MakeSortOptions ¶
type UpdateAtDescCursor ¶
func (*UpdateAtDescCursor) MakeSortOptions ¶
Click to show internal directories.
Click to hide internal directories.