controllers

package
v0.0.0-...-6fee585 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TableName = "Videos"

Functions

func GenerateUniqueVideoId

func GenerateUniqueVideoId(uid string) string

Types

type SessionController

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

func NewSessionController

func NewSessionController(db *dynamodb.DynamoDB, cache *badger.DB, s3 *s3.S3) *SessionController

func (SessionController) CancelRecordingHandler

func (sc SessionController) CancelRecordingHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (SessionController) CreateCacheEntry

func (uc SessionController) CreateCacheEntry(vid string, uid string, ts int) error

func (SessionController) CreateVideoMetadata

func (sc SessionController) CreateVideoMetadata(v models.MetaData) error

func (SessionController) CreateVideosTable

func (sc SessionController) CreateVideosTable() error

func (SessionController) DeleteCacheEntry

func (uc SessionController) DeleteCacheEntry(vid string) error

func (SessionController) DeleteVideo

func (sc SessionController) DeleteVideo(vid string) error

Called when recording is cancelled. Hence only updating cache

func (SessionController) DeleteVideoFromBucket

func (sc SessionController) DeleteVideoFromBucket(videoName string, bucketName string)

TODO : Error handling

func (SessionController) DeleteVideoMetadata

func (sc SessionController) DeleteVideoMetadata(id string) error

func (SessionController) GetCacheEntry

func (uc SessionController) GetCacheEntry(vid string) (models.Entry, error)

func (SessionController) GetVideo

func (sc SessionController) GetVideo(vid string) ([]byte, bool)

func (SessionController) GetVideoMetadaHandler

func (sc SessionController) GetVideoMetadaHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (SessionController) GetVideoMetadata

func (sc SessionController) GetVideoMetadata(vid string) (models.MetaData, error)

func (SessionController) NewVideo

func (sc SessionController) NewVideo(vid string, uid string) []byte

func (SessionController) NewVideoHandler

func (sc SessionController) NewVideoHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (SessionController) UpdateCacheEntryState

func (uc SessionController) UpdateCacheEntryState(vid string, newState string) error

func (SessionController) UpdateVideoMetadataStatus

func (sc SessionController) UpdateVideoMetadataStatus(vid string, s string) error

func (SessionController) UpdateVideoStateHandler

func (sc SessionController) UpdateVideoStateHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func (SessionController) UpdateVideoStatus

func (sc SessionController) UpdateVideoStatus(vid string, status string) []byte

TODO: use go routines

Jump to

Keyboard shortcuts

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