// Put adds/updates an image to the registry
553911
func (s *storeImpl) Put(ctx datastore.Context, image *Image) error {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("ImageRegistryStore.Put"))
	return s.ds.Put(ctx, image.key(), image)
}
1016142
func (d datastore) Put(path string, data interface{}) error {
	d[path] = data
	return nil
}
845821
func (r *Session) PushImageChecksumRegistry(imgData *ImgData, registry string) error {
	u := registry + "images/" + imgData.ID + "/checksum"

	logrus.Debugf("[registry] Calling PUT %s", u)

	req, err := http.NewRequest("PUT", u, nil)
	if err != nil {
		return err
	}
	req.Header.Set("X-Docker-Checksum", imgData.Checksum)
	req.Header.Set("X-Docker-Checksum-Payload", imgData.ChecksumPayload)

	res, err := r.client.Do(req)
	if err != nil {
		return fmt.Errorf("Failed to upload metadata: %v", err)
	}
	defer res.Body.Close()
	if len(res.Cookies()) > 0 {
		r.client.Jar.SetCookies(req.URL, res.Cookies())
	}
	if res.StatusCode != 200 {
		errBody, err := ioutil.ReadAll(res.Body)
		if err != nil {
			return fmt.Errorf("HTTP code %d while uploading metadata and error when trying to parse response body: %s", res.StatusCode, err)
		}
		var jsonBody map[string]string
		if err := json.Unmarshal(errBody, &jsonBody); err != nil {
			errBody = []byte(err.Error())
		} else if jsonBody["error"] == "Image already exists" {
			return ErrAlreadyExists
		}
		return fmt.Errorf("HTTP code %d while uploading metadata: %q", res.StatusCode, errBody)
	}
	return nil
}
709373
func (p *Plugin) Put(key string, data proto.Message, opts ...datasync.PutOption) error {
	if !p.isKvEnabled() {
		return nil
	}

	if p.adapter != nil {
		return p.adapter.db.Put(key, data, opts...)
	}

	return ErrNotReady
}
630880
func (c FakeClient) Put(path string, value interface{}) error {
	return c.repo.resourcesData.Put(path, value)
}
723458
func (p *bytesManualAsyncPublisherKafka) Put(key string, data []byte) error {
	p.conn.SendAsyncMessageToPartition(p.topic, p.partition, sarama.StringEncoder(key), sarama.ByteEncoder(data), nil, p.succCallback, p.errCallback)
	return nil
}
168600
func (kv *KV) Put(key, value []byte) error {
	_, err := kv.db.Exec(
		fmt.Sprintf("REPLACE INTO %s(id, k, v) VALUES (?,?,?)", string(kv.table)),
		kv.id(key), gkv.Btos(key), gkv.Btos(value),
	)
	return err
}
1351211
func (b *batch) Put(key, value []byte) error {
	b.b.Put(key, value)
	b.size += len(value)
	return nil
}
843096
func (k *KV) Put(p *KVPair, q *WriteOptions) (*WriteMeta, error) {
	params := make(map[string]string, 1)
	if p.Flags != 0 {
		params["flags"] = strconv.FormatUint(p.Flags, 10)
	}
	_, wm, err := k.put(p.Key, params, p.Value, q)
	return wm, err
}
738895
func (b *Bucket) Put(key []byte, value []byte) error {
	_ = b.btree.ReplaceOrInsert(&item{key: key, value: value})
	return nil
}
498693
func (store *MemoryStore) Put(e event.Event) error {
	store.Lock()
	defer store.Unlock()
	if store.eC == store.limit {
		return errLimitExceeded
	}
	key, kErr := getNewUUID()
	if kErr != nil {
		return kErr
	}
	store.events[key] = e
	store.eC++
	return nil
}
1116616
func Put(path string, h interface{}, m ...interface{}) {
	Default.Put(path, h, m...)
}
26659
func (ng *memAutoCertCache) Put(ctx context.Context, key string, data []byte) error {
	ng.mtx.Lock()
	defer ng.mtx.Unlock()
	ng.kv[key] = data
	return nil
}
607096
func (pbs *proxyBlobStore) Put(ctx context.Context, mediaType string, p []byte) (distribution.Descriptor, error) {
	return distribution.Descriptor{}, distribution.ErrUnsupported
}
1332699
func (rc *RequestConfig) PUT(path string) *RequestConfig {
	rc.Path = path
	rc.Method = "PUT"

	return rc
}
1013429
func (c *Client) Put(key string, value []byte, flags uint64) error {
	_, err := c.putCAS(key, value, flags, 0, false)
	return err
}
1279834
func (c ChannelAwareFakeClient) Put(path string, value interface{}) error {
	return c.charmstore.Put(path, value)
}