draincloud-core/internal/files_engine/engine.go
2024-11-23 03:52:06 -05:00

40 lines
610 B
Go

package filesengine
import (
"context"
"git.optclblast.xyz/draincloud/draincloud-core/internal/storage"
)
type FilesEngine struct {
blobStorage storage.BlobStorage
metaStorage storage.MetaStorage
}
func NewFilesEngine(
blobStorage storage.BlobStorage,
metaStorage storage.MetaStorage,
) *FilesEngine {
return &FilesEngine{
blobStorage: blobStorage,
metaStorage: metaStorage,
}
}
type File struct {
Name string
UserID int64
Ext string
Type string
Size int64
Data []byte
}
func (e *FilesEngine) SaveFile(
ctx context.Context,
file File,
) (int64, error) {
return -1, nil
}