Feat: finish object storage

This commit is contained in:
2025-12-07 21:24:33 +08:00
parent b609421a6e
commit 203a787063
16 changed files with 232 additions and 48 deletions

View File

@@ -37,4 +37,9 @@ type Database interface {
imageId int64,
aliasNames []string,
) error
InsertImage(
ctx context.Context,
image *models.Image,
) error
}

View File

@@ -1,4 +1,19 @@
package interfaces
import (
"context"
"io"
)
type ObjectStorage interface {
PutImage(
ctx context.Context,
name string,
r io.Reader,
size int64,
) error
GetImage(
ctx context.Context,
name string,
) (io.Reader, error)
}