// Get returns the ClaimedKeyPair for the given public key id
357697
func (kp *Keypairs) Get(publicKeyID *identity.ID) (*ClaimedKeyPair, error) {
	if publicKeyID == nil {
		return nil, errors.New("Invalid PublicKeyID provided to get keypair")
	}

	ckp, ok := kp.idIndex[*publicKeyID]
	if !ok {
		return nil, ErrPublicKeyNotFound
	}

	return &ckp, nil
}
1277884
func (c *APIContext) Get(key string) (value interface{}, exists bool) {
	if c.keys != nil {
		value, exists = c.keys[key]
	}
	return
}
621733
func (c *Conn) Get(key string) (string, error) {
	s, err := c.GetBytes(key)
	if err != nil {
		return "", err
	}
	return string(s), nil
}
143657
func (trust *NotarySigner) GetKey(keyid string) data.PublicKey {
	pubKey, _, err := trust.getKeyInfo(keyid)
	if err != nil {
		return nil
	}
	return pubKey
}
641561
func (context *BaseContext) Get(key string) interface{} {
	if value, ok := context.userData[key]; ok {
		return value
	}
	return nil
}
1008472
func (ir *generatorRegistry) get(key GeneratorID) InterfaceGeneratorFunc {
	g, _ := ir.generators[key]
	return g
}
1037867
func (c *Scratch) Get(key string) interface{} {
	c.mu.RLock()
	val := c.values[key]
	c.mu.RUnlock()

	return val
}
612440
func (c *NodbCacher) Get(key string) interface{} {
	val, err := c.db.Get([]byte(key))
	if err != nil {
		return nil
	}
	if len(val) > 0 {
		return string(val)
	}
	return nil
}
89115
func (c *Config) Get(key string) (v interface{}) {
	return c.GetKey(c.NewKey(key))
}
79769
func (p Parameters) Get(key string) string {
	if p == nil {
		return ""
	}
	value, ok := p[key]
	if !ok {
		return ""
	}
	return value
}
947645
func (r *RootKeyStorage) Get(_ context.Context, id []byte) ([]byte, error) {
	if r.encKey == nil {
		return nil, ErrStoreLocked
	}
	var rootKey []byte
	err := r.View(func(tx *bbolt.Tx) error {
		dbKey := tx.Bucket(rootKeyBucketName).Get(id)
		if len(dbKey) == 0 {
			return fmt.Errorf("root key with id %s doesn't exist",
				string(id))
		}

		decKey, err := r.encKey.Decrypt(dbKey)
		if err != nil {
			return err
		}

		rootKey = make([]byte, len(decKey))
		copy(rootKey[:], decKey)
		return nil
	})
	if err != nil {
		return nil, err
	}

	return rootKey, nil
}
1204715
func (d *NullDatastore) Get(key Key) (value []byte, err error) {
	return nil, ErrNotFound
}
588447
func (c *Cache) Get(key interface{}) (value interface{}, ok bool) {
	c.lock.Lock()
	value, ok = c.lru.Get(key)
	c.lock.Unlock()
	return value, ok
}
757741
func (s *NodbStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
1257983
func (c *Ctx) Get(key interface{}) (value interface{}, exists bool) {
	value = c.netContext.Value(key)
	exists = value != nil
	return
}
1125866
func (l *ShardedNoTS) Get(tenantID, key string) (interface{}, error) {
	cache, ok := l.cache[tenantID]
	if !ok {
		return nil, ErrNotFound
	}

	return cache.Get(key)
}
794846
func (c *ClaimTreeClient) Get(ctx context.Context, orgID *identity.ID,
	ownerID *identity.ID) (*ClaimTree, error) {

	if orgID == nil {
		return nil, errors.New("An org id must be provided")
	}

	cts, err := c.List(ctx, orgID, ownerID)
	if err != nil {
		return nil, err
	}

	if len(cts) != 1 {
		return nil, ErrClaimTreeNotFound
	}

	return &cts[0], nil
}