// Retrieve retrieves the keys from the environment.
185005
func (e *EnvProvider) Retrieve() (Value, error) {
	e.retrieved = false

	token := os.Getenv(EnvCredentialsVarToken)
	if token == "" {
		return Value{ProviderName: EnvCredentialsProviderName},
			ErrEnvCredentialsTokenNotFound
	}

	e.retrieved = true
	value := Value{
		Token:        token,
		Account:      os.Getenv(EnvCredentialsVarAccount),
		ProviderName: EnvCredentialsProviderName,
	}

	return value, nil
}
1128219
func (rc *Redis) Get(key string) (interface{}, error) {
	val, err := rc.do("GET", key)
	if err != nil {
		if rc.Debug {
			log.Println("[Redis]GetErr: ", err, "Key:", key)
		}
		return nil, err
	}
	var v interface{}
	err = Decode(val.([]byte), &v)
	if err != nil {
		if rc.Debug {
			log.Println("[Redis]DecodeErr: ", err, "Key:", key)
		}
		return nil, err
	}
	if rc.Debug {
		log.Println("[Redis]Get: ", key)
	}
	return v, err
}
388084
func (r *MemoryNoTS) Get(key string) (interface{}, error) {
	value, ok := r.items[key]
	if !ok {
		return nil, ErrNotFound
	}

	return value, nil
}
1232941
func (p Provider) Retrieve() (credentials.Value, error) {
	creds := credentials.Value{
		ProviderName: ProviderName,
	}

	k, s, t, err := p.RetrieveFn()
	if err != nil {
		return creds, awserr.New(ErrCodePluginProviderRetrieve,
			"failed to retrieve credentials with plugin provider", err)
	}

	creds.AccessKeyID = k
	creds.SecretAccessKey = s
	creds.SessionToken = t

	return creds, nil
}
222979
func (c *LRU) Get(key interface{}) (value interface{}, ok bool) {
	if ent, ok := c.items[key]; ok {
		c.evictList.MoveToFront(ent)
		return ent.Value.(*entry).value, true
	}
	return
}
1245360
func (m *STSWebIdentity) Retrieve() (Value, error) {
	a, err := getWebIdentityCredentials(m.Client, m.stsEndpoint, m.getWebIDTokenExpiry)
	if err != nil {
		return Value{}, err
	}

	// Expiry window is set to 10secs.
	m.SetExpiration(a.Result.Credentials.Expiration, DefaultExpiryWindow)

	return Value{
		AccessKeyID:     a.Result.Credentials.AccessKey,
		SecretAccessKey: a.Result.Credentials.SecretKey,
		SessionToken:    a.Result.Credentials.SessionToken,
		SignerType:      SignatureV4,
	}, nil
}
1010555
func (db *GoLevelDB) Get(key []byte) []byte {
	key = nonNilBytes(key)
	res, err := db.db.Get(key, nil)
	if err != nil {
		if err == errors.ErrNotFound {
			return nil
		}
		panic(err)
	}
	return res
}
130227
func (p *ProcessProvider) Retrieve() (credentials.Value, error) {
	out, err := p.executeCredentialProcess()
	if err != nil {
		return credentials.Value{ProviderName: ProviderName}, err
	}

	// Serialize and validate response
	resp := &credentialProcessResponse{}
	if err = json.Unmarshal(out, resp); err != nil {
		return credentials.Value{ProviderName: ProviderName}, awserr.New(
			ErrCodeProcessProviderParse,
			fmt.Sprintf("%s: %s", errMsgProcessProviderParse, string(out)),
			err)
	}

	if resp.Version != 1 {
		return credentials.Value{ProviderName: ProviderName}, awserr.New(
			ErrCodeProcessProviderVersion,
			errMsgProcessProviderVersion,
			nil)
	}

	if len(resp.AccessKeyID) == 0 {
		return credentials.Value{ProviderName: ProviderName}, awserr.New(
			ErrCodeProcessProviderRequired,
			errMsgProcessProviderMissKey,
			nil)
	}

	if len(resp.SecretAccessKey) == 0 {
		return credentials.Value{ProviderName: ProviderName}, awserr.New(
			ErrCodeProcessProviderRequired,
			errMsgProcessProviderMissSecret,
			nil)
	}

	// Handle expiration
	p.staticCreds = resp.Expiration == nil
	if resp.Expiration != nil {
		p.SetExpiration(*resp.Expiration, p.ExpiryWindow)
	}

	return credentials.Value{
		ProviderName:    ProviderName,
		AccessKeyID:     resp.AccessKeyID,
		SecretAccessKey: resp.SecretAccessKey,
		SessionToken:    resp.SessionToken,
	}, nil
}
728446
func (p *ApplicationCredentialsProvider) Retrieve() (Value, error) {
	p.retrieved = false

	filename, err := p.filename()
	if err != nil {
		return Value{}, err
	}

	f, err := os.Open(filename)
	if err != nil {
		return Value{}, err
	}
	defer f.Close()

	creds := Value{}
	if err := json.NewDecoder(f).Decode(&creds); err != nil {
		return Value{}, err
	}

	p.retrieved = true
	return creds, nil
}
1190178
func (s *LedisStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
1189002
func (dbInst *DB) Get(key []byte) ([]byte, error) {
	value, err := dbInst.db.Get(key, dbInst.readOpts)
	if err == leveldb.ErrNotFound {
		value = nil
		err = nil
	}
	if err != nil {
		logger.Errorf("Error retrieving leveldb key [%#v]: %s", key, err)
		return nil, errors.Wrapf(err, "error retrieving leveldb key [%#v]", key)
	}
	return value, nil
}
429682
func (v *Values) Get(key Key) (value interface{}) {
	value, _ = v.GetOk(key)
	return value
}
995660
func (db *Database) Get(key []byte) ([]byte, error) {
	dat, err := db.db.Get(key, nil)
	if err != nil {
		return nil, err
	}
	return dat, nil
}
1125866
func (l *ShardedNoTS) Get(tenantID, key string) (interface{}, error) {
	cache, ok := l.cache[tenantID]
	if !ok {
		return nil, ErrNotFound
	}

	return cache.Get(key)
}
745717
func (c *Container) Get(key interface{}) (interface{}, error) {

	for k := 0; k < c.length; k++ {
		if equal(c.items[k].Key, key) {
			return c.items[k].Value, nil
		}
	}
	if c.length < num {
		return nil, errNOTFOUND
	}
	if c.next == nil {
		return nil, errNOTFOUND
	}
	return c.next.Get(key)
}
1217460
func (es *EnvironmentsService) Get(ctx context.Context, name string) (e *Environment, resp *APIResponse, err error) {
	e = &Environment{}
	_, resp, err = es.client.getAction(ctx, &APIClientRequest{
		Path:         "admin/environments/" + name,
		ResponseBody: e,
		APIVersion:   apiV2,
	})

	return
}
1139476
func (c *Context) Get(key interface{}) interface{} {
	store := c.getStore()
	if store == nil {
		return store
	}
	if value, ok := store[key]; ok {
		return value
	}
	if c.Parent != nil {
		return c.Parent.Get(key)
	}
	return nil
}