handlers

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: AGPL-3.0 Imports: 49 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 AdminAddUser added in v0.7.0

func AdminAddUser(ctx *gin.Context)

func AdminAddVendorBackend added in v0.3.1

func AdminAddVendorBackend(ctx *gin.Context)

func AdminApprovePendingRoom added in v0.7.0

func AdminApprovePendingRoom(ctx *gin.Context)

func AdminApprovePendingUser added in v0.7.0

func AdminApprovePendingUser(ctx *gin.Context)

func AdminBanRoom added in v0.7.0

func AdminBanRoom(ctx *gin.Context)

func AdminBanUser added in v0.7.0

func AdminBanUser(ctx *gin.Context)

func AdminDeleteRoom added in v0.5.2

func AdminDeleteRoom(ctx *gin.Context)

func AdminDeleteUser added in v0.7.0

func AdminDeleteUser(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 AdminEditSettings added in v0.7.0

func AdminEditSettings(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 AdminGetRooms added in v0.7.0

func AdminGetRooms(ctx *gin.Context)

func AdminGetUserJoinedRooms added in v0.7.0

func AdminGetUserJoinedRooms(ctx *gin.Context)

func AdminGetUserRooms added in v0.7.0

func AdminGetUserRooms(ctx *gin.Context)

func AdminGetUsers added in v0.7.0

func AdminGetUsers(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 AdminSendTestEmail added in v0.7.0

func AdminSendTestEmail(ctx *gin.Context)

func AdminSettings added in v0.3.0

func AdminSettings(ctx *gin.Context)

func AdminUnBanRoom added in v0.7.0

func AdminUnBanRoom(ctx *gin.Context)

func AdminUnBanUser added in v0.7.0

func AdminUnBanUser(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 ChangeCurrentMovie

func ChangeCurrentMovie(ctx *gin.Context)

func CheckRoom

func CheckRoom(ctx *gin.Context)

func CheckRoomPassword added in v0.7.0

func CheckRoomPassword(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 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 GetUserBindEmailStep1Captcha added in v0.4.5

func GetUserBindEmailStep1Captcha(ctx *gin.Context)

func GetUserRetrievePasswordEmailStep1Captcha added in v0.4.5

func GetUserRetrievePasswordEmailStep1Captcha(ctx *gin.Context)

func GetUserSignupEmailStep1Captcha added in v0.4.5

func GetUserSignupEmailStep1Captcha(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 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 *log.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 RoomAdminDeleteMember added in v0.7.0

func RoomAdminDeleteMember(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 RoomInfo added in v0.7.0

func RoomInfo(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 RootAddAdmin added in v0.7.0

func RootAddAdmin(ctx *gin.Context)

func RootDeleteAdmin added in v0.7.0

func RootDeleteAdmin(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 UserBindEmail added in v0.4.5

func UserBindEmail(ctx *gin.Context)

func UserBindProviders added in v0.3.0

func UserBindProviders(ctx *gin.Context)

func UserCheckJoinedRoom added in v0.7.0

func UserCheckJoinedRoom(ctx *gin.Context)

func UserDeleteRoom added in v0.5.2

func UserDeleteRoom(ctx *gin.Context)

func UserJoinedRooms added in v0.7.0

func UserJoinedRooms(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 UserSignupPassword added in v0.7.0

func UserSignupPassword(ctx *gin.Context)

func UserUnbindEmail added in v0.4.5

func UserUnbindEmail(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