// OrigErr returns the invalid parameters as a awserr.BatchedErrors value
492605
func (e ErrInvalidParams) OrigErr() error {
	return awserr.NewBatchError(
		InvalidParameterErrCode, e.Message(), e.OrigErrs())
}
143333
func (w *filePoller) sendErr(e error, chClose <-chan struct{}) error {
	select {
	case w.errors <- e:
	case <-chClose:
		return fmt.Errorf("closed")
	}
	return nil
}
1303599
func (rl *RevelLogger) SetHandler(h LogHandler) {
	rl.Logger.SetHandler(callHandler(h.Log))
}
1298309
func RetryIsErr(fn func(error) bool) RetryFn {
	return func(attempt Attempt) bool {
		return fn(attempt.Error)
	}
}
705123
func (b *Backend) Logger() log.Logger {
	if b.logger != nil {
		return b.logger
	}

	return logging.NewVaultLoggerWithWriter(ioutil.Discard, log.NoLevel)
}
846343
func UnaryServerInterceptor() grpc.UnaryServerInterceptor {
	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
		if v, ok := req.(validator); ok {
			if err := v.Validate(); err != nil {
				return nil, grpc.Errorf(codes.InvalidArgument, err.Error())
			}
		}
		return handler(ctx, req)
	}
}
157850
func Logger(l *log.Logger) TokenLimiterOption {
	return func(tl *TokenLimiter) error {
		tl.log = l
		return nil
	}
}
907683
func DescriberFor(kind unversioned.GroupKind, c *client.Client) (Describer, bool) {
	f, ok := describerMap(c)[kind]
	return f, ok
}
458432
func UnaryClientInterceptor(logger *zap.Logger, opts ...Option) grpc.UnaryClientInterceptor {
	o := evaluateClientOpt(opts)
	return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
		fields := newClientLoggerFields(ctx, method)
		startTime := time.Now()
		err := invoker(ctx, method, req, reply, cc, opts...)
		logFinalClientLine(o, logger.With(fields...), startTime, err, "finished client unary call")
		return err
	}
}
1155124
func Logger(logger *zap.Logger) Option {
	return optionFunc(func(opts *options) {
		opts.logger = logger
	})
}
1051719
func NoErr(t Tester, e error) {
	if e != nil {
		t.Fatalf(callerStrf(WithFrameWrapper(t), "expected no error but got %s", e))
	}
}
450867
func (ba *BoolArray) BoolArrayOr(or []bool) []bool {
	switch {
	case ba == nil:
		return or
	case !ba.Valid:
		return or
	default:
		return ba.BoolArray
	}
}
504277
func GetStringErr(key string, args ...interface{}) (string, error) {
	return std.GetStringErr(key, args...)
}
532458
func (tr Row) BoolErr(nn int) (val bool, err error) {
	switch data := tr[nn].(type) {
	case nil:
		// nop
	case int8:
		val = (data != 0)
	case int32:
		val = (data != 0)
	case int16:
		val = (data != 0)
	case int64:
		val = (data != 0)
	case uint8:
		val = (data != 0)
	case uint32:
		val = (data != 0)
	case uint16:
		val = (data != 0)
	case uint64:
		val = (data != 0)
	case []byte:
		var v int64
		v, err = strconv.ParseInt(string(data), 0, 64)
		val = (v != 0)
	case *[]byte:
		var v int64
		v, err = strconv.ParseInt(string(*data), 0, 64)
		val = (v != 0)
	default:
		err = os.ErrInvalid
	}
	return
}
478470
func LogIfErr(err error, l Loggable, msg string, args ...interface{}) {
	if err != nil {
		l.Printf("%s: %s", err.Error(), fmt.Sprintf(msg, args...))
	}
}
1167664
func (b *BasicAuth) UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
	if err := b.doAuth(ctx); err != nil {
		return nil, err
	}
	return handler(ctx, req)
}
571820
func ErrorHandler(h utils.ErrorHandler) optSetter {
	return func(b *Buffer) error {
		b.errHandler = h
		return nil
	}
}