handlers

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: AGPL-3.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const MaxChatMessageLength = 4096

Variables

View Source
var (
	ErrAuthFailed  = errors.New("auth failed")
	ErrAuthExpired = errors.New("auth expired")
	ErrRoomAlready = errors.New("room already exists")
)
View Source
var (
	HOST = settings.NewStringSetting(
		"host",
		"",
		model.SettingGroupServer,
		settings.WithValidatorString(func(s string) error {
			if s == "" {
				return nil
			}
			if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") {
				return errors.New("host must start with http:// or https://")
			}
			_, err := url.Parse(s)
			return err
		}),
	)
)

Functions

func AddAdmin

func AddAdmin(ctx *gin.Context)

func AddUser added in v0.3.0

func AddUser(ctx *gin.Context)

func AdminAddVendorBackend added in v0.3.1

func AdminAddVendorBackend(ctx *gin.Context)

func AdminDeleteRoom added in v0.5.2

func AdminDeleteRoom(ctx *gin.Context)

func AdminDeleteVendorBackends added in v0.3.1

func AdminDeleteVendorBackends(ctx *gin.Context)

func AdminDisableVendorBackends added in v0.3.1

func AdminDisableVendorBackends(ctx *gin.Context)

func AdminEnableVendorBackends added in v0.3.1

func AdminEnableVendorBackends(ctx *gin.Context)

func AdminGetRoomMembers added in v0.5.0

func AdminGetRoomMembers(ctx *gin.Context)

func AdminGetVendorBackends added in v0.3.1

func AdminGetVendorBackends(ctx *gin.Context)

func AdminReconnectVendorBackends added in v0.3.1

func AdminReconnectVendorBackends(ctx *gin.Context)

func AdminRoomPassword added in v0.3.0

func AdminRoomPassword(ctx *gin.Context)

func AdminSettings added in v0.3.0

func AdminSettings(ctx *gin.Context)

func AdminUpdateVendorBackends added in v0.3.1

func AdminUpdateVendorBackends(ctx *gin.Context)

func AdminUserPassword added in v0.3.0

func AdminUserPassword(ctx *gin.Context)

func AdminUsername added in v0.3.0

func AdminUsername(ctx *gin.Context)

func ApprovePendingRoom added in v0.3.0

func ApprovePendingRoom(ctx *gin.Context)

func ApprovePendingUser added in v0.3.0

func ApprovePendingUser(ctx *gin.Context)

func BanRoom added in v0.3.0

func BanRoom(ctx *gin.Context)

func BanUser added in v0.3.0

func BanUser(ctx *gin.Context)

func ChangeCurrentMovie

func ChangeCurrentMovie(ctx *gin.Context)

func CheckRoom

func CheckRoom(ctx *gin.Context)

func ClearMovies

func ClearMovies(ctx *gin.Context)

func CreateRoom added in v0.3.0

func CreateRoom(ctx *gin.Context)

func CurrentMovie

func CurrentMovie(ctx *gin.Context)

func DelMovie

func DelMovie(ctx *gin.Context)

func DeleteAdmin added in v0.3.0

func DeleteAdmin(ctx *gin.Context)

func DeleteRoom

func DeleteRoom(ctx *gin.Context)

func DeleteUser added in v0.3.0

func DeleteUser(ctx *gin.Context)

func EditAdminSettings added in v0.3.0

func EditAdminSettings(ctx *gin.Context)

func EditMovie

func EditMovie(ctx *gin.Context)

func GetPageItems

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

func GetUserBindEmailStep1Captcha added in v0.4.5

func GetUserBindEmailStep1Captcha(ctx *gin.Context)

func GetUserRetrievePasswordEmailStep1Captcha added in v0.4.5

func GetUserRetrievePasswordEmailStep1Captcha(ctx *gin.Context)

func GetUserRooms added in v0.3.0

func GetUserRooms(ctx *gin.Context)

func GetUserSignupEmailStep1Captcha added in v0.4.5

func GetUserSignupEmailStep1Captcha(ctx *gin.Context)

func GuestJoinRoom added in v0.5.0

func GuestJoinRoom(ctx *gin.Context)

func Init

func Init(e *gin.Engine)

func JoinFlvLive added in v0.3.5

func JoinFlvLive(ctx *gin.Context)

func JoinHlsLive added in v0.3.5

func JoinHlsLive(ctx *gin.Context)

func JoinLive

func JoinLive(ctx *gin.Context)

func LoginRoom

func LoginRoom(ctx *gin.Context)

func LoginUser added in v0.3.0

func LoginUser(ctx *gin.Context)

func LogoutUser added in v0.3.0

func LogoutUser(ctx *gin.Context)

func Me

func Me(ctx *gin.Context)

func Movies

func Movies(ctx *gin.Context)

func NewPublishKey

func NewPublishKey(ctx *gin.Context)

func NewWSMessageHandler

func NewWSMessageHandler(u *op.User, r *op.Room, l *logrus.Entry) 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 PushMovies added in v0.3.0

func PushMovies(ctx *gin.Context)

func RoomAdminApproveMember added in v0.5.0

func RoomAdminApproveMember(ctx *gin.Context)

func RoomAdminBanMember added in v0.5.0

func RoomAdminBanMember(ctx *gin.Context)

func RoomAdminMembers added in v0.5.0

func RoomAdminMembers(ctx *gin.Context)

func RoomAdminUnbanMember added in v0.5.0

func RoomAdminUnbanMember(ctx *gin.Context)

func RoomHotList added in v0.3.0

func RoomHotList(ctx *gin.Context)

func RoomList

func RoomList(ctx *gin.Context)

func RoomMe added in v0.5.0

func RoomMe(ctx *gin.Context)

func RoomMembers added in v0.5.0

func RoomMembers(ctx *gin.Context)

func RoomPiblicSettings added in v0.5.0

func RoomPiblicSettings(ctx *gin.Context)

func RoomSetAdmin added in v0.5.0

func RoomSetAdmin(ctx *gin.Context)

func RoomSetAdminPermissions added in v0.5.0

func RoomSetAdminPermissions(ctx *gin.Context)

func RoomSetMember added in v0.5.0

func RoomSetMember(ctx *gin.Context)

func RoomSetMemberPermissions added in v0.5.0

func RoomSetMemberPermissions(ctx *gin.Context)

func RoomSetting added in v0.3.0

func RoomSetting(ctx *gin.Context)

func Rooms

func Rooms(ctx *gin.Context)

func SendTestEmail added in v0.4.5

func SendTestEmail(ctx *gin.Context)

func SendUserBindEmailCaptcha added in v0.4.5

func SendUserBindEmailCaptcha(ctx *gin.Context)

func SendUserRetrievePasswordEmailCaptcha added in v0.4.5

func SendUserRetrievePasswordEmailCaptcha(ctx *gin.Context)

func SendUserSignupEmailCaptcha added in v0.4.5

func SendUserSignupEmailCaptcha(ctx *gin.Context)

func ServeHlsLive added in v0.3.5

func ServeHlsLive(ctx *gin.Context)

func SetRoomPassword added in v0.3.0

func SetRoomPassword(ctx *gin.Context)

func SetRoomSetting added in v0.3.0

func SetRoomSetting(ctx *gin.Context)

func SetUserPassword

func SetUserPassword(ctx *gin.Context)

func SetUsername added in v0.3.0

func SetUsername(ctx *gin.Context)

func Settings

func Settings(ctx *gin.Context)

func SwapMovie

func SwapMovie(ctx *gin.Context)

func UnBanRoom added in v0.3.0

func UnBanRoom(ctx *gin.Context)

func UnBanUser added in v0.3.0

func UnBanUser(ctx *gin.Context)

func UserBindEmail added in v0.4.5

func UserBindEmail(ctx *gin.Context)

func UserBindProviders added in v0.3.0

func UserBindProviders(ctx *gin.Context)

func UserDeleteRoom added in v0.5.2

func UserDeleteRoom(ctx *gin.Context)

func UserRetrievePasswordEmail added in v0.4.5

func UserRetrievePasswordEmail(ctx *gin.Context)

func UserRooms added in v0.3.0

func UserRooms(ctx *gin.Context)

func UserSignupEmail added in v0.4.5

func UserSignupEmail(ctx *gin.Context)

func UserUnbindEmail added in v0.4.5

func UserUnbindEmail(ctx *gin.Context)

func Users added in v0.3.0

func Users(ctx *gin.Context)

Types

type FormatErrNotSupportFileType

type FormatErrNotSupportFileType string

func (FormatErrNotSupportFileType) Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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