Documentation ¶
Index ¶
- func NewLabelsProvider() models.LabelsProvider
- type Response
- type Source
- type StorageProvider
- func (sp *StorageProvider) CleanupStorage(ctx context.Context, _ models.InputSource, volume storage.StorageVolume) error
- func (sp *StorageProvider) GetVolumeSize(context.Context, models.InputSource) (uint64, error)
- func (sp *StorageProvider) HasStorageLocally(context.Context, models.InputSource) (bool, error)
- func (sp *StorageProvider) IsInstalled(context.Context) (bool, error)
- func (sp *StorageProvider) PrepareStorage(ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
- func (sp *StorageProvider) Upload(ctx context.Context, localPath string) (models.SpecConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLabelsProvider ¶ added in v1.2.1
func NewLabelsProvider() models.LabelsProvider
Types ¶
type Source ¶ added in v1.0.4
type Source struct {
Repo string
}
func DecodeSpec ¶ added in v1.0.4
func DecodeSpec(spec *models.SpecConfig) (Source, error)
type StorageProvider ¶
type StorageProvider struct { CloneClient *clone.Clone IPFSClient *apicopy.StorageProvider }
func NewStorage ¶
func NewStorage(IPFSapiclient *apicopy.StorageProvider) (*StorageProvider, error)
func (*StorageProvider) CleanupStorage ¶
func (sp *StorageProvider) CleanupStorage( ctx context.Context, _ models.InputSource, volume storage.StorageVolume, ) error
func (*StorageProvider) GetVolumeSize ¶
func (sp *StorageProvider) GetVolumeSize(context.Context, models.InputSource) (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, models.InputSource) (bool, error)
func (*StorageProvider) IsInstalled ¶
func (sp *StorageProvider) IsInstalled(context.Context) (bool, error)
func (*StorageProvider) PrepareStorage ¶
func (sp *StorageProvider) PrepareStorage( ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
func (*StorageProvider) Upload ¶
func (sp *StorageProvider) Upload(ctx context.Context, localPath string) (models.SpecConfig, error)
Click to show internal directories.
Click to hide internal directories.