Documentation ¶
Index ¶
- func Codecs(notifier func(codec *Codec)) (codecs map[string]*Codec, closer func())
- func NewCriteriaBuilder(ctx context.Context, builder CriteriaBuilder) context.Context
- func Register(name string, codec *Codec)
- func RegisterCodec(name string, codec Instance, at time.Time)
- func RegisterFactory(name string, factory Factory, at time.Time)
- type Codec
- type Column
- type ColumnsSource
- type Config
- type Criteria
- type CriteriaBuilder
- type CriteriaBuilderOptions
- type Factory
- type Instance
- type Option
- func WithColumnsSource(columnSource ColumnsSource) Option
- func WithOptions(options ...interface{}) Option
- func WithRecord(record interface{}) Option
- func WithSelector(selector Selector) Option
- func WithTypeLookup(fn func(name string) (reflect.Type, error)) Option
- func WithValueGetter(option ValueGetter) Option
- func WithValueLookup(fn func(ctx context.Context, name string) (interface{}, error)) Option
- type Options
- type Predicate
- type PredicateHandler
- type Registry
- func (r *Registry) Codecs(notifier func(codec *Codec)) (map[string]*Codec, func())
- func (r *Registry) Lookup(name string) (*Codec, error)
- func (r *Registry) RegisterCodec(name string, codec *Codec)
- func (r *Registry) RegisterFactory(name string, factory Factory, at time.Time)
- func (r *Registry) RegisterInstance(name string, instance Instance, at time.Time)
- type RegistryOption
- type Selector
- type ValueGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCriteriaBuilder ¶
func NewCriteriaBuilder(ctx context.Context, builder CriteriaBuilder) context.Context
NewCriteriaBuilder creates a new criteria builder context
Types ¶
type ColumnsSource ¶
type CriteriaBuilder ¶
type CriteriaBuilder interface {
BuildCriteria(ctx context.Context, value interface{}, options *CriteriaBuilderOptions) (*Criteria, error)
}
func CriteriaBuilderFromContext ¶
func CriteriaBuilderFromContext(ctx context.Context) CriteriaBuilder
CriteriaBuilderFromContext returns criteria builder from context
type CriteriaBuilderOptions ¶
type CriteriaBuilderOptions struct { Expression string Columns ColumnsSource Parameters ValueGetter Selector Selector }
type Option ¶
type Option func(o *Options)
Option func to set options
func WithColumnsSource ¶
func WithColumnsSource(columnSource ColumnsSource) Option
WithColumnsSource creates columnSource option
func WithOptions ¶
func WithOptions(options ...interface{}) Option
WithOptions creates untyped options
func WithSelector ¶
WithSelector creates selector option
func WithTypeLookup ¶
WithTypeLookup creates type lookup option
func WithValueGetter ¶
func WithValueGetter(option ValueGetter) Option
WithValueGetter creates value gettter options
type Options ¶
type Options struct { LookupType func(name string) (reflect.Type, error) Record interface{} LookupValue func(ctx context.Context, name string) (interface{}, error) ColumnsSource Selector ValueGetter Options []interface{} }
Options represents codec options
type PredicateHandler ¶
type Registry ¶
func New ¶
func New(opts ...RegistryOption) *Registry
func (*Registry) RegisterCodec ¶
func (*Registry) RegisterFactory ¶
type RegistryOption ¶
type RegistryOption func(registry *Registry)
func WithFactory ¶
func WithFactory(name string, factory Factory, at time.Time) RegistryOption
Click to show internal directories.
Click to hide internal directories.