20 lines
765 B
Go
Raw Normal View History

2024-04-10 22:10:09 +08:00
package interfaces
import (
"context"
"io"
2024-04-10 22:10:09 +08:00
"nf-repo/internal/model"
"nf-repo/internal/tool/rerr"
2024-04-10 22:10:09 +08:00
)
type ManifestHandler interface {
Get(ctx context.Context, repo string, target string) (io.ReadCloser, string, *rerr.RepositoryError)
2024-04-15 18:02:54 +08:00
Put(ctx context.Context, repo string, target string, digest string, mf *model.RepoSimpleManifest) *rerr.RepositoryError
2024-04-10 22:10:09 +08:00
Delete(ctx context.Context, repo string, target string) *rerr.RepositoryError
2024-04-15 18:02:54 +08:00
Catalog(ctx context.Context, limit int, last int, keyword string) (*model.Catalog, *rerr.RepositoryError)
Tags(ctx context.Context, repo string, limit, last int, keyword string) (*model.Tag, *rerr.RepositoryError)
2024-04-10 22:10:09 +08:00
Referrers(ctx context.Context, repo string, target string) (*model.IndexManifest, *rerr.RepositoryError)
}