Versions in this module Expand all Collapse all v1 v1.1.0 Mar 15, 2020 v1.0.0 Mar 15, 2020 Changes in this version + var ErrFirstArgHasInvalidType = errors.New("first input argument must have context.Context type") + var ErrInvalidQueryRunnerSignature = errors.New("queryRunner must have 3 input params") + var ErrNotFound = errors.New("query runner not found") + var ErrQueryRunnerIsNotAFunction = errors.New("queryRunner is not a function") + var ErrSecondArgHasInvalidType = errors.New("second input argument must be a struct") + var ErrThirdArgHasInvalidType = errors.New("third input argument must be a pointer to a struct") + type Dispatcher struct + func NewDispatcher() *Dispatcher + func (d *Dispatcher) RegisterQueryRunner(queryRunnerFnName string, queryRunnerFn QueryRunnerFn) + func (d *Dispatcher) RunQuery(ctx context.Context, q interface{}, r interface{}) error + type QueryRunner interface + RunQuery func(ctx context.Context, query interface{}, report interface{}) error + type QueryRunnerFn func(ctx context.Context, query interface{}, report interface{}) error + func Adapt(queryRunner interface{}) (QueryRunnerFn, error) + func MustAdapt(queryRunner interface{}) QueryRunnerFn