// WithRecipientFunc will return a context with the recipient callback set
514431
func WithRecipientFunc(ctx context.Context, imf store.RecipientCallback) context.Context {
	return context.WithValue(ctx, ctxKeyRecipientFunc, imf)
}
568556
func IsEditRecipients(ctx context.Context) bool {
	bv, ok := ctx.Value(ctxKeyEditRecipients).(bool)
	if !ok {
		return false
	}
	return bv
}
286512
func (s *Store) GetRecipients(context.Context, string) ([]string, error) {
	return nil, fmt.Errorf("not supported")
}
337113
func (c *Client) WithContext(ctx context.Context) *Client {
	newC := *c
	newC.ctx = ctx
	return &newC
}
518791
func HasCheckRecipients(ctx context.Context) bool {
	_, ok := ctx.Value(ctxKeyCheckRecipients).(bool)
	return ok
}
1218049
func (e *Email) AddRecipients(Recipients ...string) {
	e.To = append(e.To, Recipients...)
}
599623
func (s *Store) AddRecipient(ctx context.Context, id string) error {
	rs, err := s.GetRecipients(ctx, "")
	if err != nil {
		return errors.Wrapf(err, "failed to read recipient list")
	}

	for _, k := range rs {
		if k == id {
			return errors.Errorf("Recipient already in store")
		}
	}

	rs = append(rs, id)

	if err := s.saveRecipients(ctx, rs, "Added Recipient "+id, true); err != nil {
		return errors.Wrapf(err, "failed to save recipients")
	}

	out.Cyan(ctx, "Reencrypting existing secrets. This may take some time ...")
	return s.reencrypt(WithReason(ctx, "Added Recipient "+id))
}
89674
func (call *PushMessageCall) WithContext(ctx context.Context) *PushMessageCall {
	call.ctx = ctx
	return call
}
1282019
func WithClient(a adaptor.Adaptor) OptionFunc {
	return func(n *Node) error {
		cli, err := a.Client()
		n.c = cli
		return err
	}
}
566630
func DialContextFuncWith(logger *events.Logger, dial func(context.Context, string, string) (net.Conn, error)) func(context.Context, string, string) (net.Conn, error) {
	return dialContextFunc(0, logger, dial)
}
891110
func WithContext(ctx context.Context, fnctx Context) context.Context {
	return context.WithValue(ctx, ctxKey, fnctx)
}
687830
func (s *Server) UseFunc(filters ...FilterFunc) {
	for _, f := range filters {
		s.filters = append(s.filters, f)
	}
}
158947
func WithContextFunc(ctx context.Context, f func()) context.Context {
	ctx, cancel := context.WithCancel(ctx)
	go func() {
		c := make(chan os.Signal)
		signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
		defer signal.Stop(c)

		select {
		case <-ctx.Done():
		case <-c:
			f()
			cancel()
		}
	}()

	return ctx
}
1002514
func (s *Store) SetRecipients(ctx context.Context, rs []string) error {
	return s.saveRecipients(ctx, rs, "Set Recipients", true)
}
212539
func (s *RecipientDsnFields) SetFinalRecipient(v string) *RecipientDsnFields {
	s.FinalRecipient = &v
	return s
}
262954
func (n *Negroni) UseHandlerFunc(handlerFunc func(rw http.ResponseWriter, r *http.Request)) {
	n.UseHandler(http.HandlerFunc(handlerFunc))
}
1095627
func WithCheckRecipients(ctx context.Context, cr bool) context.Context {
	return context.WithValue(ctx, ctxKeyCheckRecipients, cr)
}