encoder

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaData

type MetaData struct {
	Filename string `json:"filename"`
}

MetaData represents metadata of a file. There is more, but we just need filename

type Repo added in v0.9.5

type Repo interface {
	UploadRequest(c echo.Context) error
	TranscodeFinished(c echo.Context) error
}

func NewEncoderController added in v0.7.0

func NewEncoderController(enc encoder.Repo, access utils.Repo) Repo

type Request

type Request struct {
	Upload      Upload
	HTTPRequest *http.Request
}

Request represents the upload and a normal HTTP request

type Storage

type Storage struct {
	Type   string
	Bucket string
	Key    string
}

Storage represents the storage medium of the object

type Store added in v0.9.6

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

func (*Store) TranscodeFinished added in v0.9.6

func (e *Store) TranscodeFinished(c echo.Context) error

TranscodeFinished handles marking a transcode item as finished

@Summary Transcode Finished @Description Marks a transcode item as finished @ID new-encoder-transcode-finished @Tags encoder @Accept json @Param taskid path int true "Task ID" @Success 200 @Router /v1/internal/encoder/transcode_finished/{taskid} [post]

func (*Store) UploadRequest added in v0.9.6

func (e *Store) UploadRequest(c echo.Context) error

UploadRequest handles authenticating an upload request.

Connects with tusd through web-hooks, so tusd POSTs here. Tusd's requests here do contain a lot of useful information. But for this endpoint, we are just checking for the JWT.

@Summary New upload request @Description Authenticates tusd's webhook requests @ID new-encoder-upload-request @Tags encoder @Accept json @Success 200 @Router /v1/internal/encoder/upload_request [post]

type Upload

type Upload struct {
	ID        string
	Size      int
	Offset    int
	IsFinal   bool
	IsPartial bool
	// PartialUploads null
	MetaData []MetaData
	Storage  Storage
}

Upload represents an object and it's status

Jump to

Keyboard shortcuts

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