func (r *Repo) getTagManifest(name, version string) (*ocispec.Manifest, error) {
	ctx, cancel := context.WithTimeout(context.Background(), getTimeout)
	defer cancel()
	u := *r.url
	u.Path = path.Join("v2", u.Path, name, "manifests", version)
	req, err := http.NewRequestWithContext(ctx, "GET", u.String(), nil)
	req.Header.Set("Accept", ImageManifestMediaType)
	if err != nil {
		return nil, errors.Trace(err)
	}
	if r.username != "" && r.password != "" {
		req.SetBasicAuth(r.username, r.password)
	}
	client := http.DefaultClient
	if r.insecure {
		tr := &http.Transport{
			TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
		}
		client = &http.Client{Transport: tr}
	}
	resp, err := client.Do(req)
	if err != nil {
		return nil, errors.Trace(err)
	}
	defer resp.Body.Close()
	status := resp.StatusCode
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, errors.Errorf("unexpected response — %d %q — from %s", status, http.StatusText(status), u.String())
	}
	if status != http.StatusOK {
		return nil, errors.Errorf("unexpected response — %d %q, %s — from %s", status, http.StatusText(status), string(body), u.String())
	}
	tm := &ocispec.Manifest{}
	if err := json.Unmarshal(body, tm); err != nil {
		return nil, err
	}
	return tm, nil
}
getTagManifest returns the manifests of a published tag
package oci
import (
	"context"
	"crypto/tls"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"path"
	"path/filepath"
	"time"
	"github.com/containerd/containerd/remotes"
	"github.com/containerd/containerd/remotes/docker"
	"github.com/deislabs/oras/pkg/content"
	"github.com/deislabs/oras/pkg/oras"
	"github.com/juju/errors"
	"helm.sh/helm/v3/pkg/chart"
	"k8s.io/klog"
	"github.com/bitnami-labs/charts-syncer/api"
	"github.com/bitnami-labs/charts-syncer/internal/cache"
	"github.com/bitnami-labs/charts-syncer/internal/utils"
	"github.com/bitnami-labs/charts-syncer/pkg/client/types"
	orascontext "github.com/deislabs/oras/pkg/context"
	ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
const (
	getTimeout = 1 * time.Minute
	HelmChartConfigMediaType = "application/vnd.cncf.helm.config.v1+json"
	HelmChartContentLayerMediaType = "application/tar+gzip"
	ImageManifestMediaType = "application/vnd.oci.image.manifest.v1+json"
)
type Repo struct {
	url      *url.URL
	username string
	password string
	insecure bool
	cache cache.Cacher
}
type Tags struct {
	Name string
	Tags []string
}
func New(repo *api.Repo, c cache.Cacher, insecure bool) (*Repo, error) {
	u, err := url.Parse(repo.GetUrl())
	if err != nil {
		return nil, errors.Trace(err)
	}
	return NewRaw(u, repo.GetAuth().GetUsername(), repo.GetAuth().GetPassword(), c, insecure)
}
func NewRaw(u *url.URL, user string, pass string, c cache.Cacher, insecure bool) (*Repo, error) {
	return &Repo{url: u, username: user, password: pass, cache: c, insecure: insecure}, nil
}
func (r *Repo) List() ([]string, error) {
	return nil, errors.Errorf("list method is not supported yet")
}