2023-09-13 06:03:25 +02:00
|
|
|
package rpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/url"
|
|
|
|
|
|
|
|
"forge.cadoles.com/arcad/edge/pkg/storage"
|
|
|
|
"forge.cadoles.com/arcad/edge/pkg/storage/driver"
|
|
|
|
"forge.cadoles.com/arcad/edge/pkg/storage/driver/rpc/client"
|
2023-09-29 07:41:01 +02:00
|
|
|
"forge.cadoles.com/arcad/edge/pkg/storage/share"
|
2023-09-13 06:03:25 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
driver.RegisterDocumentStoreFactory("rpc", documentStoreFactory)
|
|
|
|
driver.RegisterBlobStoreFactory("rpc", blobStoreFactory)
|
2023-09-29 07:41:01 +02:00
|
|
|
driver.RegisterShareStoreFactory("rpc", shareStoreFactory)
|
2023-09-13 06:03:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func documentStoreFactory(url *url.URL) (storage.DocumentStore, error) {
|
|
|
|
return client.NewDocumentStore(url), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func blobStoreFactory(url *url.URL) (storage.BlobStore, error) {
|
|
|
|
return client.NewBlobStore(url), nil
|
|
|
|
}
|
2023-09-29 07:41:01 +02:00
|
|
|
|
|
|
|
func shareStoreFactory(url *url.URL) (share.Store, error) {
|
|
|
|
return client.NewShareStore(url), nil
|
|
|
|
}
|