storage

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MaxRetryCount = 10
	SleepDuration = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IpfsCluster added in v0.2.5

type IpfsCluster struct {
	Client clusterClient.Client
}

IpfsCluster Storage struct

func GetIpfsClusterStorage added in v0.1.7

func GetIpfsClusterStorage(storageConfig config.IpfsConfiguration) (*IpfsCluster, error)

GetIpfsClusterStorage connection to the Storage Server

func (*IpfsCluster) GetVideo added in v0.2.5

func (ipfs *IpfsCluster) GetVideo(ctx context.Context, cid string, path string) error

GetVideo and store in the path

func (*IpfsCluster) UploadVideo added in v0.2.5

func (ipfs *IpfsCluster) UploadVideo(ctx context.Context, path string) (string, error)

UploadVideo in path to Storage

type Storage

type Storage interface {
	UploadVideo(context.Context, string) (string, error)
	GetVideo(context.Context, string, string) error
}

Storage interface

func GetStorageClient

func GetStorageClient(storageConfig config.StorageConfiguration) (Storage, error)

GetStorageClient using the configuration, any new configurations will be added here

Jump to

Keyboard shortcuts

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