// ListRecipients lists all recipients for the given store
160212
func (r *Store) ListRecipients(ctx context.Context, store string) []string {
	ctx, sub, _ := r.getStore(ctx, store)
	return sub.Recipients(ctx)
}
76067
func (d *Downloader) DeliverReceipts(id string, receipts [][]*types.Receipt) (err error) {
	return d.deliver(id, d.receiptCh, &receiptPack{id, receipts}, receiptInMeter, receiptDropMeter)
}
1348290
func (s *Action) RecipientsUpdate(ctx context.Context, c *cli.Context) error {
	changed := 0

	mps := s.Store.MountPoints()
	sort.Sort(store.ByPathLen(mps))
	for _, alias := range append(mps, "") {
		subs, err := s.Store.GetSubStore(alias)
		if err != nil || subs == nil {
			continue
		}
		recp, err := subs.GetRecipients(ctx, "")
		if err != nil {
			if err != sub.ErrRecipientChecksumChanged {
				return err
			}
		}
		if err == nil && s.cfg.GetRecipientHash(alias, subs.Crypto().IDFile()) != "" {
			continue
		}
		if alias == "" {
			alias = "<root>"
		}
		out.Cyan(ctx, "Please confirm Recipients for %s:", alias)
		for _, r := range recp {
			out.Print(ctx, "- %s", subs.Crypto().FormatKey(ctx, r))
		}
		if !termio.AskForConfirmation(ctx, fmt.Sprintf("Do you trust these recipients for %s?", alias)) {
			continue
		}
		if err := subs.SetRecipients(ctx, recp); err != nil {
			return err
		}
		out.Print(ctx, "")
		changed++
	}

	if changed > 0 {
		out.Green(ctx, "Updated %d stores", changed)
	} else {
		out.Green(ctx, "Nothing to do")
	}

	return nil
}
809233
func (o *OrgsClient) List(ctx context.Context) ([]envelope.Org, error) {
	var orgs []envelope.Org
	err := o.client.RoundTrip(ctx, "GET", "/orgs", nil, nil, &orgs)
	return orgs, err
}
1369993
func (m *Message) AddRecipientAndVariables(r string, vars map[string]interface{}) error {
	if m.RecipientCount() >= MaxNumberOfRecipients {
		return fmt.Errorf("recipient limit exceeded (max %d)", MaxNumberOfRecipients)
	}
	m.to = append(m.to, r)
	if vars != nil {
		if m.recipientVariables == nil {
			m.recipientVariables = make(map[string]map[string]interface{})
		}
		m.recipientVariables[r] = vars
	}
	return nil
}
517411
func HasEditRecipients(ctx context.Context) bool {
	_, ok := ctx.Value(ctxKeyEditRecipients).(bool)
	return ok
}
1111937
func (s *serviceLister) List(selector labels.Selector) (ret []*v1.Service, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.Service))
	})
	return ret, err
}
928343
func (r *Reply) List() ([]string, error) {
	// Doing all this in two places instead of just calling ListBytes() so we don't have
	// to iterate twice
	if r.Type == ErrorReply {
		return nil, r.Err
	}
	if r.Type != MultiReply {
		return nil, errors.New("reply type is not MultiReply")
	}

	strings := make([]string, len(r.Elems))
	for i, v := range r.Elems {
		if v.Type == BulkReply {
			strings[i] = string(v.buf)
		} else if v.Type == NilReply {
			strings[i] = ""
		} else {
			return nil, errors.New("element type is not BulkReply or NilReply")
		}
	}

	return strings, nil
}
863655
func (q *queue) DeliverReceipts(id string, receiptList [][]*types.Receipt) (int, error) {
	q.lock.Lock()
	defer q.lock.Unlock()

	reconstruct := func(header *types.Header, index int, result *fetchResult) error {
		if types.DeriveSha(types.Receipts(receiptList[index])) != header.ReceiptHash {
			return errInvalidReceipt
		}
		result.Receipts = receiptList[index]
		return nil
	}
	return q.deliver(id, q.receiptTaskPool, q.receiptTaskQueue, q.receiptPendPool, q.receiptDonePool, receiptReqTimer, len(receiptList), reconstruct)
}
119660
func (s *ImageStoreService) ListImageStores(p *ListImageStoresParams) (*ListImageStoresResponse, error) {
	resp, err := s.cs.newRequest("listImageStores", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListImageStoresResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
286512
func (s *Store) GetRecipients(context.Context, string) ([]string, error) {
	return nil, fmt.Errorf("not supported")
}
530646
func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1beta1.CertificateSigningRequest))
	})
	return ret, err
}
1002514
func (s *Store) SetRecipients(ctx context.Context, rs []string) error {
	return s.saveRecipients(ctx, rs, "Set Recipients", true)
}
723821
func (s *RemoteStore) ListFiles() []string {
	logrus.Infof("listing files from %s", s.location)
	ctx, cancel := s.getContext()
	defer cancel()
	fl, err := s.client.ListFiles(ctx, &google_protobuf.Empty{})
	if err != nil {
		logrus.Errorf("error listing files from %s: %s", s.location, err.Error())
		return nil
	}
	return fl.FileNames
}
32265
func (r *Store) ListRevisions(ctx context.Context, name string) ([]backend.Revision, error) {
	ctx, store, name := r.getStore(ctx, name)
	return store.ListRevisions(ctx, name)
}
1340049
func (s *BouncedRecipientInfo) SetRecipient(v string) *BouncedRecipientInfo {
	s.Recipient = &v
	return s
}
1324852
func List(c *messagebird.Client) (*HLRList, error) {
	hlrList := &HLRList{}
	if err := c.Request(hlrList, http.MethodGet, path, nil); err != nil {
		return nil, err
	}

	return hlrList, nil
}