code: func (c *client) PutManifest(ctx context.Context, ref reference.Named, manifest distribution.Manifest) (digest.Digest, error) {
  	repoEndpoint, err := newDefaultRepositoryEndpoint(ref, c.insecureRegistry)
  	if err != nil {
  		return digest.Digest(""), err
  	}
  
  	repo, err := c.getRepositoryForReference(ctx, ref, repoEndpoint)
  	if err != nil {
  		return digest.Digest(""), err
  	}
  
  	manifestService, err := repo.Manifests(ctx)
  	if err != nil {
  		return digest.Digest(""), err
  	}
  
  	_, opts, err := getManifestOptionsFromReference(ref)
  	if err != nil {
  		return digest.Digest(""), err
  	}
  
  	dgst, err := manifestService.Put(ctx, manifest, opts...)
  	return dgst, errors.Wrapf(err, "failed to put manifest %s", ref)
  }
docs: // PutManifest sends the manifest to a registry and returns the new digest