Documentation ¶
Index ¶
- type Response
- type StorageProvider
- func (sp *StorageProvider) CleanupStorage(ctx context.Context, _ model.StorageSpec, volume storage.StorageVolume) error
- func (sp *StorageProvider) Explode(_ context.Context, spec model.StorageSpec) ([]model.StorageSpec, error)
- func (sp *StorageProvider) GetVolumeSize(context.Context, model.StorageSpec) (uint64, error)
- func (sp *StorageProvider) HasStorageLocally(context.Context, model.StorageSpec) (bool, error)
- func (sp *StorageProvider) IsInstalled(context.Context) (bool, error)
- func (sp *StorageProvider) PrepareStorage(ctx context.Context, storageSpec model.StorageSpec) (storage.StorageVolume, error)
- func (sp *StorageProvider) Upload(ctx context.Context, localPath string) (model.StorageSpec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageProvider ¶
type StorageProvider struct { LocalDir string EstuaryAPIKey string CloneClient *clone.Clone IPFSClient *apicopy.StorageProvider }
func NewStorage ¶
func NewStorage(cm *system.CleanupManager, IPFSapiclient *apicopy.StorageProvider, EstuaryAPIKey string) (*StorageProvider, error)
func (*StorageProvider) CleanupStorage ¶
func (sp *StorageProvider) CleanupStorage( ctx context.Context, _ model.StorageSpec, volume storage.StorageVolume, ) error
func (*StorageProvider) Explode ¶
func (sp *StorageProvider) Explode(_ context.Context, spec model.StorageSpec) ([]model.StorageSpec, error)
func (*StorageProvider) GetVolumeSize ¶
func (sp *StorageProvider) GetVolumeSize(context.Context, model.StorageSpec) (uint64, error)
Could do a HEAD request and check Content-Length, but in some cases that's not guaranteed to be the real end file size
func (*StorageProvider) HasStorageLocally ¶
func (sp *StorageProvider) HasStorageLocally(context.Context, model.StorageSpec) (bool, error)
func (*StorageProvider) IsInstalled ¶
func (sp *StorageProvider) IsInstalled(context.Context) (bool, error)
func (*StorageProvider) PrepareStorage ¶
func (sp *StorageProvider) PrepareStorage(ctx context.Context, storageSpec model.StorageSpec) (storage.StorageVolume, error)
func (*StorageProvider) Upload ¶
func (sp *StorageProvider) Upload(ctx context.Context, localPath string) (model.StorageSpec, error)
Click to show internal directories.
Click to hide internal directories.