2024-04-14 21:48:27 +08:00

15 lines
402 B
Go

package interfaces
import (
"context"
"io"
"nf-repo/internal/model"
)
type BlobHandler interface {
Get(ctx context.Context, repo string, hash model.Hash) (io.ReadCloser, error)
Stat(ctx context.Context, repo string, hash model.Hash) (int64, error)
Put(ctx context.Context, repo string, hash model.Hash, rc io.ReadCloser) error
Delete(ctx context.Context, repo string, hash model.Hash) error
}