use the request context

This commit is contained in:
MaysWind
2025-08-02 00:10:12 +08:00
parent 56a3905df1
commit cad53d0bfc
8 changed files with 59 additions and 54 deletions
+6 -4
View File
@@ -1,9 +1,11 @@
package storage
import "github.com/mayswind/ezbookkeeping/pkg/core"
// ObjectStorage represents an object storage to store file object
type ObjectStorage interface {
Exists(path string) (bool, error)
Read(path string) (ObjectInStorage, error)
Save(path string, object ObjectInStorage) error
Delete(path string) error
Exists(ctx core.Context, path string) (bool, error)
Read(ctx core.Context, path string) (ObjectInStorage, error)
Save(ctx core.Context, path string, object ObjectInStorage) error
Delete(ctx core.Context, path string) error
}