Documentation ¶
Index ¶
- type Source
- type StorageProvider
- func (s *StorageProvider) CleanupStorage(_ context.Context, storageSpec models.InputSource, vol storage.StorageVolume) error
- func (s *StorageProvider) GetVolumeSize(ctx context.Context, volume models.InputSource) (uint64, error)
- func (s *StorageProvider) HasStorageLocally(ctx context.Context, volume models.InputSource) (bool, error)
- func (s *StorageProvider) IsInstalled(ctx context.Context) (bool, error)
- func (s *StorageProvider) PrepareStorage(ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
- func (s *StorageProvider) Upload(ctx context.Context, localPath string) (models.SpecConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶ added in v1.0.4
type Source struct {
CID string `json:"CID"`
}
func DecodeSpec ¶ added in v1.0.4
func DecodeSpec(spec *models.SpecConfig) (Source, error)
type StorageProvider ¶
type StorageProvider struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage(cl ipfs.Client) (*StorageProvider, error)
func (*StorageProvider) CleanupStorage ¶
func (s *StorageProvider) CleanupStorage(_ context.Context, storageSpec models.InputSource, vol storage.StorageVolume) error
func (*StorageProvider) GetVolumeSize ¶
func (s *StorageProvider) GetVolumeSize(ctx context.Context, volume models.InputSource) (uint64, error)
func (*StorageProvider) HasStorageLocally ¶
func (s *StorageProvider) HasStorageLocally(ctx context.Context, volume models.InputSource) (bool, error)
func (*StorageProvider) IsInstalled ¶
func (s *StorageProvider) IsInstalled(ctx context.Context) (bool, error)
func (*StorageProvider) PrepareStorage ¶
func (s *StorageProvider) PrepareStorage( ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
func (*StorageProvider) Upload ¶
func (s *StorageProvider) Upload(ctx context.Context, localPath string) (models.SpecConfig, error)
Click to show internal directories.
Click to hide internal directories.