// Set writes a secret
768618
func (s *Store) Set(ctx context.Context, name string, sec store.Secret) error {
	d := sec.Data()
	if d == nil {
		d = make(map[string]interface{}, 1)
	}
	d[passwordKey] = sec.Password()
	_, err := s.api.Logical().Write(path.Join(s.path, name), d)
	return err
}
215972
func (smap *syncedMap) Set(key interface{}, val interface{}) {
	smap.Lock()
	defer smap.Unlock()

	smap.data[key] = val
}
433592
func (s *MemStore) Set(key, val interface{}) error {
	s.lock.Lock()
	defer s.lock.Unlock()

	s.data[key] = val
	return nil
}
848408
func (r *Redis) Set(key string, value interface{}) error {
	return r.Client.Set(key, convertToBytes(value), 0).Err()
}
1001125
func (c *MemoryCache) Set(key string, resp []byte) {
	c.mu.Lock()
	c.items[key] = resp
	c.mu.Unlock()
}
249261
func (c *Cache) Set(key string, resp []byte) {
	item := &memcache.Item{
		Key:   cacheKey(key),
		Value: resp,
	}
	c.Client.Set(item)
}
757654
func (s *ID) Set(v string) error {
	id, err := ParseID(v)
	if err != nil {
		return trace.Wrap(err)
	}
	*s = *id
	return nil
}
286431
func (c *Strings) Set(value string) error {
	*c = append(*c, value)
	return nil
}
1046468
func (c *certificateCache) set(addr string, certificate ssh.Signer, ttl time.Duration) error {
	c.mu.Lock()
	defer c.mu.Unlock()

	err := c.cache.Set(addr, certificate, ttl)
	if err != nil {
		return trace.Wrap(err)
	}

	return nil
}
172283
func (s *Scanner) Set(k, v []byte, opset uint) bool {
	if !s.checkOpen() {
		return false
	}
	s.set = true
	s.key, s.val, s.err = s.cur.Get(k, v, opset)
	return s.err == nil
}
1361540
func (c *JSONConfigContainer) Set(key, val string) error {
	c.Lock()
	defer c.Unlock()
	c.data[key] = val
	return nil
}
972657
func (s *fs) Set(data []byte) (digest.Digest, error) {
	s.Lock()
	defer s.Unlock()

	if len(data) == 0 {
		return "", fmt.Errorf("invalid empty data")
	}

	dgst := digest.FromBytes(data)
	if err := ioutils.AtomicWriteFile(s.contentFile(dgst), data, 0600); err != nil {
		return "", errors.Wrap(err, "failed to write digest data")
	}

	return dgst, nil
}
899110
func (j *Json) Set(key string, val interface{}) {
	m, err := j.Map()
	if err != nil {
		return
	}
	m[key] = val
}
954003
func (c *Client) Set(key, value string) (err error) {
	_, err = c.execWithKey(true, "SET", key, value)
	return
}
924267
func (r *Memory) Set(key string, value interface{}) error {
	r.Lock()
	defer r.Unlock()

	return r.cache.Set(key, value)
}
687005
func (i *UintValue) Set(s string) error {
	v, err := strconv.ParseUint(s, 0, 64)
	*i = UintValue(v)
	return err
}
745953
func (s *AttributeValue) SetS(v string) *AttributeValue {
	s.S = &v
	return s
}