storage

package
v0.0.0-...-5d9d774 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClipStorageCredentials

type ClipStorageCredentials struct {
	S3 *S3ClipStorageCredentials
}

type ClipStorageInterface

type ClipStorageInterface interface {
	ReadFile(node *common.ClipNode, dest []byte, offset int64) (int, error)
	Metadata() *common.ClipArchiveMetadata
	CachedLocally() bool
	Cleanup() error
}

func NewClipStorage

func NewClipStorage(archivePath string, cachePath string, metadata *common.ClipArchiveMetadata, credentials ClipStorageCredentials) (ClipStorageInterface, error)

type LocalClipStorage

type LocalClipStorage struct {
	// contains filtered or unexported fields
}

func NewLocalClipStorage

func NewLocalClipStorage(metadata *common.ClipArchiveMetadata, opts LocalClipStorageOpts) (*LocalClipStorage, error)

func (*LocalClipStorage) CachedLocally

func (s *LocalClipStorage) CachedLocally() bool

func (*LocalClipStorage) Cleanup

func (s *LocalClipStorage) Cleanup() error

func (*LocalClipStorage) Metadata

func (*LocalClipStorage) ReadFile

func (s *LocalClipStorage) ReadFile(node *common.ClipNode, dest []byte, off int64) (int, error)

type LocalClipStorageOpts

type LocalClipStorageOpts struct {
	ArchivePath string
}

type S3ClipStorage

type S3ClipStorage struct {
	// contains filtered or unexported fields
}

func NewS3ClipStorage

func NewS3ClipStorage(metadata *common.ClipArchiveMetadata, opts S3ClipStorageOpts) (*S3ClipStorage, error)

func (*S3ClipStorage) CachedLocally

func (s3c *S3ClipStorage) CachedLocally() bool

func (*S3ClipStorage) Cleanup

func (s3c *S3ClipStorage) Cleanup() error

func (*S3ClipStorage) Metadata

func (s3c *S3ClipStorage) Metadata() *common.ClipArchiveMetadata

func (*S3ClipStorage) ReadFile

func (s3c *S3ClipStorage) ReadFile(node *common.ClipNode, dest []byte, off int64) (int, error)

func (*S3ClipStorage) Upload

func (s3c *S3ClipStorage) Upload(ctx context.Context, archivePath string, progressChan chan<- int) error

type S3ClipStorageCredentials

type S3ClipStorageCredentials struct {
	AccessKey string
	SecretKey string
}

type S3ClipStorageOpts

type S3ClipStorageOpts struct {
	Bucket    string
	Key       string
	Region    string
	Endpoint  string
	CachePath string
	AccessKey string
	SecretKey string
}

Jump to

Keyboard shortcuts

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