func WithKeys(keys ...string) Option {
	return &Config{
		Keys: keys,
	}
}
WithKeys configures keys for paginator
package paginator
var defaultConfig = Config{
	Keys:  []string{"ID"},
	Limit: 10,
	Order: DESC,
}
type Option interface {
	Apply(p *Paginator)
}
type Config struct {
	Rules  []Rule
	Keys   []string
	Limit  int
	Order  Order
	After  string
	Before string
}
func (c *Config) Apply(p *Paginator) {
	if c.Rules != nil {
		p.SetRules(c.Rules...)
	}
	if c.Rules == nil && c.Keys != nil {
		p.SetKeys(c.Keys...)
	}
	if c.Limit != 0 {
		p.SetLimit(c.Limit)
	}
	if c.Order != "" {
		p.SetOrder(c.Order)
	}
	if c.After != "" {
		p.SetAfterCursor(c.After)
	}
	if c.Before != "" {
		p.SetBeforeCursor(c.Before)
	}
}
func WithRules(rules ...Rule) Option {
	return &Config{
		Rules: rules,
	}
}