func WithKeyPrefix(keyPrefix runtime.Key) FindOpt {
	return func(opts *FindOpts) {
		if opts.key != "" {
			panic("can't use WithKeyPrefix with key specified")
		}
		if opts.keyPrefix != "" {
			panic("can't use WithKeyPrefix more then one time")
		}
		opts.keyPrefix = keyPrefix
	}
}
WithKeyPrefix defines key prefix to find objects with keys prefixed with it
package store
import (
	"github.com/Aptomi/aptomi/pkg/runtime"
)
type FindOpt func(opts *FindOpts)
type FindOpts struct {
	keyPrefix     runtime.Key
	key           runtime.Key
	gen           runtime.Generation
	fieldEqName   string
	fieldEqValues []interface{}
	getLast       bool
	getFirst      bool
}
func (opts *FindOpts) GetKeyPrefix() runtime.Key {
	return opts.keyPrefix
}
func (opts *FindOpts) GetKey() runtime.Key {
	return opts.key
}
func (opts *FindOpts) GetGen() runtime.Generation {
	return opts.gen
}
func (opts *FindOpts) GetFieldEqName() string {
	return opts.fieldEqName
}
func (opts *FindOpts) GetFieldEqValues() []interface{} {
	return opts.fieldEqValues
}
func (opts *FindOpts) IsGetFirst() bool {
	return opts.getFirst
}
func (opts *FindOpts) IsGetLast() bool {
	return opts.getLast
}
func NewFindOpts(opts []FindOpt) *FindOpts {
	findOpts := &FindOpts{}
	for _, opt := range opts {
		opt(findOpts)
	}
	return findOpts
}
func WithKey(key runtime.Key) FindOpt {
	return func(opts *FindOpts) {
		if opts.key != "" {
			panic("can't use WithKey more then one time")
		}
		opts.key = key
	}
}