handlers

package
v0.0.0-...-d0df74b Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

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

type Component

type Component struct {
	DB *mongo.Client
	MQ *amqp.Channel
	S3 *s3.S3
}

type Entity

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

type Handler

type Handler interface {
	CreateRTMPUpLink()
	ControlUpLinkWindow(userID string, open bool) (err error)
	StreamLive(username string, w http.ResponseWriter, r *http.Request) (err error)

	Register(idToken data.UserRegister) (err error)

	UserDetails(userID string) (detail data.UserDetail, err error)
	UserGetOneByID(userID string) (user data.User, err error)

	CastList(variant string, count, offset int, userID ...string) (videos []data.Video, err error)
	AuthorList(author string, withUnlisted bool, count, offset int) (videos []data.Video, err error)
	SearchVideo(query string, tags []string, count, offset int) (videos []data.Video, err error)
	VideoDetails(hash string) (video data.Video, err error)
	CreateVOD(upload data.VideoUpload, controller beego.Controller, userID string) (ID primitive.ObjectID, err error)
	DeleteVideo(ID primitive.ObjectID, userID string) (err error)
	UpdateVideo(video data.VideoEdit, controller beego.Controller, userID string) (err error)
	CheckUniqueVideoTitle(title string) (err error)
	LikeVideo(userID string, hash string, like bool) (err error)
	Subscribe(userID string, username string, subscribe bool) (err error)
	CheckUserLikes(hash, username string) (liked bool, err error)
	CheckUserSubscribes(authorID string, username string) (subscribed bool, err error)
	CommentVideo(userID string, hash, content string) (comment data.Comment, err error)

	TranscodeListenerWorker()
	StartTranscode(hash string)

	ConnectNotificationWS(ctx *context.Context, userID string) (err error)
	ConnectChatWS(ctx *context.Context, hash string, userID ...string) (err error)
	NotificationPingWorker(conn *websocket.Conn)
	ChatReaderWorker(conn *websocket.Conn, hash string, user data.User, live bool)
	PushNotification(userID string, message data.NotificationOutgoing)
	BroadcastNotificationSubscriber(authorID string, message data.NotificationOutgoing)
}

func NewHandler

func NewHandler(component Component) Handler

type Live

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

type Notification

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

type Stream

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

Jump to

Keyboard shortcuts

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