Documentation ¶
Index ¶
- Constants
- Variables
- func AddAdmin(ctx *gin.Context)
- func AuthRoom(Authorization string) (*room.User, error)
- func AuthRtmpPublish(Authorization string) (channelName string, err error)
- func ChangeCurrentMovie(ctx *gin.Context)
- func CheckRoom(ctx *gin.Context)
- func CheckUser(ctx *gin.Context)
- func ClearMovies(ctx *gin.Context)
- func CloseRoom(ctx *gin.Context)
- func CurrentMovie(ctx *gin.Context)
- func DelAdmin(ctx *gin.Context)
- func DelMovie(ctx *gin.Context)
- func DeleteRoom(ctx *gin.Context)
- func EditMovie(ctx *gin.Context)
- func GetPageItems[T any](ctx *gin.Context, items []T) ([]T, error)
- func Init(e *gin.Engine, s *rtmps.Server)
- func JoinLive(ctx *gin.Context)
- func LoginRoom(ctx *gin.Context)
- func Me(ctx *gin.Context)
- func MovieList(ctx *gin.Context)
- func Movies(ctx *gin.Context)
- func NewCreateRoomHandler(s *rtmps.Server) gin.HandlerFunc
- func NewPublishKey(ctx *gin.Context)
- func NewRtmpAuthorization(channelName string) (string, error)
- func NewWSMessageHandler(u *room.User) func(c *websocket.Conn) error
- func NewWebSocketHandler(wss *utils.WebSocket) gin.HandlerFunc
- func ProxyMovie(ctx *gin.Context)
- func PushMovie(ctx *gin.Context)
- func RoomList(ctx *gin.Context)
- func SetPassword(ctx *gin.Context)
- func SetUserPassword(ctx *gin.Context)
- func Settings(ctx *gin.Context)
- func SwapMovie(ctx *gin.Context)
- func WebServer(e gin.IRoutes)
- type ApiResp
- type AuthClaims
- type CreateRoomReq
- type EditMovieReq
- type FormatErrNotSupportFileType
- type FormatErrNotSupportPosition
- type IdReq
- type IdsReq
- type LoginRoomReq
- type PushMovieReq
- type RoomListResp
- type RtmpClaims
- type SetPasswordReq
- type SwapMovieReq
- type UsernameReq
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") )
View Source
var ( ErrRoomIDEmpty = errors.New("roomid is empty") ErrRoomNotFound = errors.New("room not found") ErrUserNotFound = errors.New("user not found") ErrRoomAlreadyExist = errors.New("room already exist") )
View Source
var (
Rooms *rooms
)
Functions ¶
func AuthRtmpPublish ¶
func ChangeCurrentMovie ¶
func ClearMovies ¶
func CurrentMovie ¶
func DeleteRoom ¶
func NewCreateRoomHandler ¶
func NewCreateRoomHandler(s *rtmps.Server) gin.HandlerFunc
func NewPublishKey ¶
func NewRtmpAuthorization ¶
func NewWebSocketHandler ¶
func NewWebSocketHandler(wss *utils.WebSocket) gin.HandlerFunc
func ProxyMovie ¶
func SetPassword ¶
func SetUserPassword ¶
Types ¶
type ApiResp ¶
type ApiResp struct { Time int64 `json:"time"` Error string `json:"error,omitempty"` Data any `json:"data,omitempty"` }
func NewApiDataResp ¶
func NewApiErrorResp ¶
func NewApiErrorStringResp ¶
type AuthClaims ¶
type CreateRoomReq ¶
type EditMovieReq ¶
type FormatErrNotSupportFileType ¶
type FormatErrNotSupportFileType string
func (FormatErrNotSupportFileType) Error ¶
func (e FormatErrNotSupportFileType) Error() string
type FormatErrNotSupportPosition ¶
type FormatErrNotSupportPosition string
func (FormatErrNotSupportPosition) Error ¶
func (e FormatErrNotSupportPosition) Error() string
type LoginRoomReq ¶
type PushMovieReq ¶
type RoomListResp ¶
type RtmpClaims ¶
type RtmpClaims struct { PullKey string `json:"p"` jwt.RegisteredClaims }
type SetPasswordReq ¶
type SetPasswordReq struct {
Password string `json:"password"`
}
type SwapMovieReq ¶
type UsernameReq ¶
type UsernameReq struct {
Username string `json:"username"`
}
Click to show internal directories.
Click to hide internal directories.