ipfs

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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)

func (Source) ToMap added in v1.0.4

func (c Source) ToMap() map[string]interface{}

func (Source) Validate added in v1.0.4

func (c Source) Validate() 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL