convertor

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressionFactor

type CompressionFactor float64

func CalculateCompression

func CalculateCompression(before, after string) (CompressionFactor, error)

func (CompressionFactor) LogValue

func (c CompressionFactor) LogValue() slog.Value

type Convertor

type Convertor struct {
	VideoConvertor
	RemoveConverted bool
	// contains filtered or unexported fields
}

func New

func New(removeConverted bool, req *requests.Requests, logger *slog.Logger) *Convertor

func (*Convertor) HandlerActiveOff

func (c *Convertor) HandlerActiveOff(_ http.ResponseWriter, _ *http.Request)

func (*Convertor) HandlerActiveOn

func (c *Convertor) HandlerActiveOn(_ http.ResponseWriter, _ *http.Request)

func (*Convertor) HandlerIsActive

func (c *Convertor) HandlerIsActive(w http.ResponseWriter, _ *http.Request)

func (*Convertor) Health

func (c *Convertor) Health(_ context.Context) any

func (*Convertor) Router

func (c *Convertor) Router(r chi.Router)

func (*Convertor) Run

func (c *Convertor) Run(ctx context.Context, concurrent int) error

func (*Convertor) SetActive

func (c *Convertor) SetActive(active bool)

type VideoConvertor

type VideoConvertor interface {
	Convert(ctx context.Context, request ffmpeg.Request) error
}

Jump to

Keyboard shortcuts

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