Documentation
¶
Overview ¶
Package cursor seals pagination positions and message references to one client and one request shape, so a caller can hand them back but never read, forge or reuse them elsewhere, and seals media references to one message.
Index ¶
- Constants
- Variables
- type Binding
- type Position
- type Ref
- type Retired
- type Sealer
- func (s *Sealer) Cursor(b Binding, p Position) (string, error)
- func (s *Sealer) OpenCursor(b Binding, text string) (Position, error)
- func (s *Sealer) OpenMedia(id, text string) ([]byte, error)
- func (s *Sealer) OpenRef(client, text string) (Ref, error)
- func (s *Sealer) SealMedia(id string, pt []byte) (string, error)
- func (s *Sealer) SealRef(client string, r Ref) (string, error)
Constants ¶
View Source
const ( MaxCursor = 256 MaxRef = 640 MaxMediaRef = 2048 RefPrefix = "m1_" )
Variables ¶
View Source
var (
ErrInvalid = errors.New("invalid cursor")
)
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.