encoder

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 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 EncoderController added in v0.7.0

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

func NewEncoderController added in v0.7.0

func NewEncoderController(enc *encoder.Encoder, access *utils.Accesser) *EncoderController

func (*EncoderController) TranscodeFinished added in v0.7.0

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

TranscodeFinished handles marking a transcode as finished

@Summary Transcode Finished @Description Marks a transcode 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 (*EncoderController) UploadRequest added in v0.8.0

func (e *EncoderController) 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 does 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 MetaData

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

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

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 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