uploader

package
v0.0.0-...-dec19c8 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package uploader contains app that handles media part uploads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger         *zap.Logger
	Notificator    *notificator.Notificator
	SessionStorage *sessionStore.Store
	URIPathPrefix  string
	S3PathPrefix   string
	S3Endpoint     string
	S3AccessKey    string
	S3SecretKey    string
	S3Bucket       string
	S3SSL          bool
}

type Service

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

Service is a media file uploader service. It implements fasthttp handler that reads uploaded part and stores it in media store. Every request is also checked for valid "upload"-session.

After each successful part upload, uploader calculates sha256 checksum and asynchronously notifies videoapi.

func New

func New(cfg *Config) (*Service, error)

func (*Service) Handler

func (svc *Service) Handler() func(*fasthttp.RequestCtx)

Jump to

Keyboard shortcuts

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