handlers

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: AGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const UserAgent = `` /* 135-byte string literal not displayed */

Variables

View Source
var (
	ErrAuthFailed  = errors.New("auth failed")
	ErrAuthExpired = errors.New("auth expired")
	ErrRoomAlready = errors.New("room already exists")
)

Functions

func AddAdmin

func AddAdmin(ctx *gin.Context)

func AuthRtmpPublish

func AuthRtmpPublish(Authorization string) (channelName string, err error)

func ChangeCurrentMovie

func ChangeCurrentMovie(ctx *gin.Context)

func CheckRoom

func CheckRoom(ctx *gin.Context)

func CheckUser

func CheckUser(ctx *gin.Context)

func ClearMovies

func ClearMovies(ctx *gin.Context)

func CurrentMovie

func CurrentMovie(ctx *gin.Context)

func DelAdmin

func DelAdmin(ctx *gin.Context)

func DelMovie

func DelMovie(ctx *gin.Context)

func DeleteRoom

func DeleteRoom(ctx *gin.Context)

func EditMovie

func EditMovie(ctx *gin.Context)

func GetPageItems

func GetPageItems[T any](ctx *gin.Context, items []T) ([]T, error)

func Init

func Init(e *gin.Engine, s *rtmps.Server, r *room.Rooms)

func JoinLive

func JoinLive(ctx *gin.Context)

func LoginRoom

func LoginRoom(ctx *gin.Context)

func Me

func Me(ctx *gin.Context)

func MovieList

func MovieList(ctx *gin.Context)

func Movies

func Movies(ctx *gin.Context)

func NewCreateRoomHandler

func NewCreateRoomHandler(s *rtmps.Server) gin.HandlerFunc

func NewPublishKey

func NewPublishKey(ctx *gin.Context)

func NewRtmpAuthorization

func NewRtmpAuthorization(channelName string) (string, error)

func NewWSMessageHandler

func NewWSMessageHandler(u *room.User) func(c *websocket.Conn) error

func NewWebSocketHandler

func NewWebSocketHandler(wss *utils.WebSocket) gin.HandlerFunc

func ProxyMovie

func ProxyMovie(ctx *gin.Context)

func PushMovie

func PushMovie(ctx *gin.Context)

func RoomList

func RoomList(ctx *gin.Context)

func SetPassword

func SetPassword(ctx *gin.Context)

func SetUserPassword

func SetUserPassword(ctx *gin.Context)

func Settings

func Settings(ctx *gin.Context)

func SwapMovie

func SwapMovie(ctx *gin.Context)

func WebServer

func WebServer(e gin.IRoutes)

Types

type FormatErrNotSupportFileType

type FormatErrNotSupportFileType string

func (FormatErrNotSupportFileType) Error

type FormatErrNotSupportPosition

type FormatErrNotSupportPosition string

func (FormatErrNotSupportPosition) Error

type RtmpClaims

type RtmpClaims struct {
	PullKey string `json:"p"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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