storage

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFSCluster

type IPFSCluster struct {
	Client clusterClient.Client
}

IPFSCluster Storage struct

func GetIPFSClusterStorage

func GetIPFSClusterStorage(storageConfig config.StorageConfiguration) (*IPFSCluster, error)

GetIPFSClusterStorage connection to the Storage Server

func (*IPFSCluster) GetVideo

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

GetVideo and store in the path

func (*IPFSCluster) UploadVideo

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

Jump to

Keyboard shortcuts

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