2024-01-29 06:55:36 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
|
|
|
|
"git.lumeweb.com/LumeWeb/libs5-go/metadata"
|
|
|
|
"git.lumeweb.com/LumeWeb/libs5-go/storage"
|
|
|
|
"git.lumeweb.com/LumeWeb/libs5-go/types"
|
|
|
|
)
|
|
|
|
|
2024-01-30 02:32:13 +00:00
|
|
|
type StorageService interface {
|
2024-01-30 01:52:17 +00:00
|
|
|
SetProviderStore(store storage.ProviderStore)
|
|
|
|
ProviderStore() storage.ProviderStore
|
|
|
|
GetCachedStorageLocations(hash *encoding.Multihash, kinds []types.StorageLocationType) (map[string]storage.StorageLocation, error)
|
|
|
|
AddStorageLocation(hash *encoding.Multihash, nodeId *encoding.NodeId, location storage.StorageLocation, message []byte) error
|
|
|
|
DownloadBytesByHash(hash *encoding.Multihash) ([]byte, error)
|
|
|
|
DownloadBytesByCID(cid *encoding.CID) ([]byte, error)
|
|
|
|
GetMetadataByCID(cid *encoding.CID) (metadata.Metadata, error)
|
2024-01-30 02:32:13 +00:00
|
|
|
Service
|
2024-01-29 06:55:36 +00:00
|
|
|
}
|