Documentation ¶
Index ¶
- type PaginationOptions
- type RawStore
- func (s *RawStore) GetCursor() any
- func (s *RawStore) LoadCursor(_ context.Context, lastToken string, backward bool) error
- func (s *RawStore) StoreCursor(_ context.Context, lastToken *string, first, last any) (*string, error)
- func (s *RawStore) StoreStringCursor(_ context.Context, lastToken *string, first, last any) (*string, error)
- func (s *RawStore) StoreTimeCursor(_ context.Context, lastToken *string, first, last any) (*string, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaginationOptions ¶
func (*PaginationOptions) EnsureSafe ¶
func (p *PaginationOptions) EnsureSafe()
type RawStore ¶
type RawStore struct {
// contains filtered or unexported fields
}
func NewRawStore ¶
func (*RawStore) LoadCursor ¶
LoadCursor 加载游标
func (*RawStore) StoreCursor ¶
func (s *RawStore) StoreCursor(_ context.Context, lastToken *string, first, last any) (*string, error)
StoreCursor 生成游标
type Store ¶
type Store interface { GetCursor() any LoadCursor(ctx context.Context, lastToken string, backward bool) error StoreCursor(_ context.Context, lastToken *string, first, last any) (*string, error) StoreStringCursor(_ context.Context, lastToken *string, first, last any) (*string, error) StoreTimeCursor(_ context.Context, lastToken *string, first, last any) (*string, error) }
Click to show internal directories.
Click to hide internal directories.