storage

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStreamExists = errors.New("stream already exists")

Functions

func SetLogger

func SetLogger(l *zap.SugaredLogger)

Types

type LocalStorage

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

func Local

func Local(path string) LocalStorage

func (LocalStorage) Delete

func (s LocalStorage) Delete(sdHash string) error

func (LocalStorage) Path added in v0.15.0

func (s LocalStorage) Path() string

type S3Configuration

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

func S3Configure

func S3Configure() *S3Configuration

func (*S3Configuration) Bucket

func (c *S3Configuration) Bucket(b string) *S3Configuration

Bucket ...

func (*S3Configuration) Credentials

func (c *S3Configuration) Credentials(accessKey, secretKey string) *S3Configuration

Credentials set access key and secret key for accessing S3 bucket.

func (*S3Configuration) DisableSSL

func (c *S3Configuration) DisableSSL() *S3Configuration

DisableSSL ...

func (*S3Configuration) Endpoint

func (c *S3Configuration) Endpoint(e string) *S3Configuration

Endpoint ...

func (*S3Configuration) Name added in v0.15.0

Name ...

func (*S3Configuration) Region

func (c *S3Configuration) Region(r string) *S3Configuration

Region ...

type S3Driver

type S3Driver struct {
	*S3Configuration
	// contains filtered or unexported fields
}

func InitS3Driver

func InitS3Driver(cfg *S3Configuration) (*S3Driver, error)

func (*S3Driver) Delete

func (s *S3Driver) Delete(streamTID string) error

func (*S3Driver) GetFragment

func (s *S3Driver) GetFragment(streamTID, name string) (StreamFragment, error)

func (*S3Driver) GetURL added in v0.15.0

func (s *S3Driver) GetURL(streamTID string) string

func (*S3Driver) Name added in v0.15.0

func (s *S3Driver) Name() string

func (*S3Driver) Put

func (s *S3Driver) Put(stream *library.Stream, overwrite bool) error

func (*S3Driver) PutWithContext added in v0.15.0

func (s *S3Driver) PutWithContext(ctx context.Context, stream *library.Stream, overwrite bool) error

type StreamFragment

type StreamFragment interface {
	io.ReadCloser
}

Jump to

Keyboard shortcuts

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