diff --git a/src/internal/kopia/snapshot_manager.go b/src/internal/kopia/snapshot_manager.go index 55cf7b8a6..8fc950dd2 100644 --- a/src/internal/kopia/snapshot_manager.go +++ b/src/internal/kopia/snapshot_manager.go @@ -66,30 +66,6 @@ type snapshotManager interface { LoadSnapshots(ctx context.Context, ids []manifest.ID) ([]*snapshot.Manifest, error) } -type OwnersCats struct { - ResourceOwners map[string]struct{} - ServiceCats map[string]ServiceCat -} - -type ServiceCat struct { - Service path.ServiceType - Category path.CategoryType -} - -// MakeServiceCat produces the expected OwnersCats.ServiceCats key from a -// path service and path category, as well as the ServiceCat value. -func MakeServiceCat(s path.ServiceType, c path.CategoryType) (string, ServiceCat) { - return serviceCatString(s, c), ServiceCat{s, c} -} - -// TODO(ashmrtn): Remove in a future PR. -// -//nolint:unused -//lint:ignore U1000 will be removed in future PR. -func serviceCatTag(p path.Path) string { - return serviceCatString(p.Service(), p.Category()) -} - func serviceCatString(s path.ServiceType, c path.CategoryType) string { return s.String() + c.String() } @@ -104,33 +80,6 @@ func makeTagKV(k string) (string, string) { return userTagPrefix + k, defaultTagValue } -// tagsFromStrings returns a map[string]string with tags for all ownersCats -// passed in. Currently uses placeholder values for each tag because there can -// be multiple instances of resource owners and categories in a single snapshot. -// TODO(ashmrtn): Remove in future PR. -// -//nolint:unused -//lint:ignore U1000 will be removed in future PR. -func tagsFromStrings(oc *OwnersCats) map[string]string { - if oc == nil { - return map[string]string{} - } - - res := make(map[string]string, len(oc.ServiceCats)+len(oc.ResourceOwners)) - - for k := range oc.ServiceCats { - tk, tv := makeTagKV(k) - res[tk] = tv - } - - for k := range oc.ResourceOwners { - tk, tv := makeTagKV(k) - res[tk] = tv - } - - return res -} - // getLastIdx searches for manifests contained in both foundMans and metas // and returns the most recent complete manifest index and the manifest it // corresponds to. If no complete manifest is in both lists returns nil, -1.