requests

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CheckKnownValue is a well known value
	CheckKnownValue = "b3scl"
)

Variables

This section is empty.

Functions

func AdminRequestHandler

func AdminRequestHandler(
	router *cluster.Router,
) cluster.RequestMiddleware

AdminRequestHandler creates a new request middleware for handling all requests related to meetings.

func BindMeetingFrontend

func BindMeetingFrontend() cluster.RequestMiddleware

BindMeetingFrontend asserts, that if a meeting exists and the meeting is either not bound to a frontend the meetings frontend will be set to the requesting frontend. We do not support rebinding between frontends and will fail if a frontend tries to steal a meeting.

func MeetingsRequestHandler

func MeetingsRequestHandler(
	router *cluster.Router,
	opts *MeetingsHandlerOptions,
) cluster.RequestMiddleware

MeetingsRequestHandler creates a new request middleware for handling all requests related to meetings.

func RecordingsRequestHandler

func RecordingsRequestHandler(
	router *cluster.Router,
	opts *RecordingsHandlerOptions,
) cluster.RequestMiddleware

RecordingsRequestHandler creates a new request middleware for handling all requests related to meetings.

func RewriteUniqueMeetingID

func RewriteUniqueMeetingID() cluster.RequestMiddleware

RewriteUniqueMeetingID ensures that the meeting id is unique by combining FrontendKey and MeetingID.

The resonse may contain MeetingIDs. If this is the case, the meeting ID will be decoded and the original meeting id will be restored.

func SetCreateParams

func SetCreateParams() cluster.RequestMiddleware

SetCreateParams produces a middleware setting default or overriding parameters in a room create request.

func SetDefaultPresentation

func SetDefaultPresentation() cluster.RequestMiddleware

SetDefaultPresentation produces a middleware for injecting a XML snippet into the request body of a create request. There are two frontend setting variables:

default_presentation.url = https://path-to-presentation
default_presentation.force = true | false

func SetMetaFrontend

func SetMetaFrontend() cluster.RequestMiddleware

SetMetaFrontend creates a middleware for adding a `meta_frontend` parameter to the create request.

Types

type AdminHandler

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

AdminHandler will handle all meetings related API requests

func (*AdminHandler) GetDefaultConfigXML

func (h *AdminHandler) GetDefaultConfigXML(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

GetDefaultConfigXML will lookup a backend for the request and will invoke the backend.

func (*AdminHandler) SetConfigXML

func (h *AdminHandler) SetConfigXML(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

SetConfigXML will lookup a backend for the request and will invoke the backend.

func (*AdminHandler) Version

func (h *AdminHandler) Version(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

Version responds with the current version. This request will not hit a real backend and is not part of the API interface.

type FrontendKeyMeetingID

type FrontendKeyMeetingID struct {
	FrontendKey string
	MeetingID   string
}

The FrontendKeyMeetingID is the combination of a frontend key and a meeting

func DecodeFrontendKeyMeetingID

func DecodeFrontendKeyMeetingID(id string) *FrontendKeyMeetingID

DecodeFrontendKeyMeetingID decodes a base64 encoded gob representation of the meeting id

func (*FrontendKeyMeetingID) EncodeToString

func (id *FrontendKeyMeetingID) EncodeToString() string

EncodeToString encodes the combined ID as base64 string

type MeetingsHandler

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

MeetingsHandler will handle all meetings related API requests

func (*MeetingsHandler) Create

func (h *MeetingsHandler) Create(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

Create will acquire a backend from the router selected for the request and create the meeting.

func (*MeetingsHandler) End

func (h *MeetingsHandler) End(
	ctx context.Context, req *bbb.Request,
) (bbb.Response, error)

End will end a meeting on a backend

func (*MeetingsHandler) GetMeetingInfo

func (h *MeetingsHandler) GetMeetingInfo(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

GetMeetingInfo will not hit a backend, but we will query the store directly.

func (*MeetingsHandler) GetMeetings

func (h *MeetingsHandler) GetMeetings(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

GetMeetings lists all meetings in the cluster relevant for the frontend

func (*MeetingsHandler) IsMeetingRunning

func (h *MeetingsHandler) IsMeetingRunning(
	ctx context.Context, req *bbb.Request,
) (bbb.Response, error)

IsMeetingRunning will check on a backend if the meeting is still running

func (*MeetingsHandler) Join

func (h *MeetingsHandler) Join(
	ctx context.Context, req *bbb.Request,
) (bbb.Response, error)

Join will try to join the meeting

If the meeting is not yet available we stall. If the backend is not available we stall. We do this by redirecting to a waiting page and reissue the request after some seconds.

type MeetingsHandlerOptions

type MeetingsHandlerOptions struct {
	// UseReverseProxy will handle the request in a way
	// that a reverse proxy can be used. This is an experimental
	// feature and a known issue is the unfortunate handling of breakout rooms.
	// When deployed in reverse proxy mode we will handle the
	// join internally and the proxy needs to handle subsequent requests.
	UseReverseProxy bool
}

MeetingsHandlerOptions has configuration options for this middleware handling all meetings related stuff.

type RecordingsHandler

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

RecordingsHandler will handle all meetings related API requests

func (*RecordingsHandler) DeleteRecordings

func (h *RecordingsHandler) DeleteRecordings(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

DeleteRecordings will lookup a backend for the request and will invoke the backend.

func (*RecordingsHandler) GetRecordingTextTracks

func (h *RecordingsHandler) GetRecordingTextTracks(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

GetRecordingTextTracks seems to be not implemented currently in scalelite. We will try to figure out later what is actually supposed to be going on here.

func (*RecordingsHandler) GetRecordings

func (h *RecordingsHandler) GetRecordings(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

GetRecordings will retrieve all recordings for the given frontend instance. The use of 'state' might be a bit confusing here: In the database, 'state' refers to the attribute holding the acutual recording JSON object. A recording itself can also have a state attribute (like published, unpublished).

func (*RecordingsHandler) PublishRecordings

func (h *RecordingsHandler) PublishRecordings(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

PublishRecordings will move recordings from the unpublished directory into the published will update the state.

func (*RecordingsHandler) PutRecordingTextTrack

func (h *RecordingsHandler) PutRecordingTextTrack(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

PutRecordingTextTrack will also be implemented later.

func (*RecordingsHandler) UpdateRecordings

func (h *RecordingsHandler) UpdateRecordings(
	ctx context.Context,
	req *bbb.Request,
) (bbb.Response, error)

UpdateRecordings will lookup a backend for the request and will invoke the backend.

type RecordingsHandlerOptions

type RecordingsHandlerOptions struct {
}

RecordingsHandlerOptions has configuration options for this middleware handling all recordings.

Jump to

Keyboard shortcuts

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