Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCursor = errors.New("invalid cursor") ErrInvalidModel = errors.New("invalid entity") )
Functions ¶
This section is empty.
Types ¶
type Cursor ¶
type Cursor struct { After *string `json:"after" query:"after"` Before *string `json:"before" query:"before"` }
Cursor cursor data
type CustomType ¶
type CustomType interface { // GetCustomTypeValue returns the value corresponding to the meta attribute inside the custom type. GetCustomTypeValue(meta any) (any, error) }
CustomType is an interface that custom types need to implement in order to allow pagination over fields inside custom types.
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder cursor decoder
func NewDecoder ¶
func NewDecoder(fields []DecoderField) *Decoder
NewDecoder creates cursor decoder for entity
type DecoderField ¶
DecoderField contains information about one decoder field.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder cursor encoder
type EncoderField ¶
EncoderField contains information about one encoder field.
Click to show internal directories.
Click to hide internal directories.