bbbapiwrapper

package
v0.0.0-...-b542c3f Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateCheckSum

func CalculateCheckSum(apiSecret, method, queries string) string

func CheckForUserId

func CheckForUserId(userId string) string

CheckForUserId will check if user id was set in proper format in BBB userId isn't compulsory but for our PNM required

func CheckMeetingIdToMatchFormat

func CheckMeetingIdToMatchFormat(meetingID string) string

CheckMeetingIdToMatchFormat will check the meeting ID format if don't match with our allowed format then it will make convert it to md5

func ConvertCreateRequest

func ConvertCreateRequest(r *CreateMeetingReq, rawQueries map[string]string) (*plugnmeet.CreateRoomReq, error)

func ConvertJoinRequest

func ConvertJoinRequest(r *JoinMeetingReq, isAdmin bool) *plugnmeet.GenerateTokenReq

Types

type Attendee

type Attendee struct {
	XMLName         xml.Name `xml:"attendee"`
	UserID          string   `xml:"userID"`
	FullName        string   `xml:"fullName"`
	Role            string   `xml:"role"`
	IsPresenter     bool     `xml:"isPresenter"`
	IsListeningOnly bool     `xml:"isListeningOnly"`
	HasJoinedVoice  bool     `xml:"hasJoinedVoice"`
	HasVideo        bool     `xml:"hasVideo"`
	ClientType      string   `xml:"clientType"`
}

type CommonApiVersion

type CommonApiVersion struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"` // SUCCESS or FAILED
	Version    float64  `xml:"version"`
}

type CommonResponse

type CommonResponse struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"` // SUCCESS or FAILED
	MessageKey string   `xml:"messageKey"`
	Message    string   `xml:"message"`
}

func CommonResponseMsg

func CommonResponseMsg(returncode, messageKey, message string) *CommonResponse

type CreateMeetingDefaultExtraData

type CreateMeetingDefaultExtraData struct {
	AttendeePW        string            `json:"attendeePW"`
	ModeratorPW       string            `json:"moderatorPW"`
	OriginalMeetingId string            `json:"originalMeetingId"`
	Meta              map[string]string `json:"meta"`
}

type CreateMeetingReq

type CreateMeetingReq struct {
	Name                    string `query:"name"`
	MeetingID               string `query:"meetingID"`
	AttendeePW              string `query:"attendeePW"`  // Deprecated
	ModeratorPW             string `query:"moderatorPW"` // Deprecated
	Welcome                 string `query:"welcome"`
	MaxParticipants         uint32 `query:"maxParticipants"`
	LogoutURL               string `query:"logoutURL"`
	Duration                uint64 `query:"duration"`
	Record                  bool   `query:"record"`
	AutoStartRecording      bool   `query:"autoStartRecording"`
	WebcamsOnlyForModerator bool   `query:"webcamsOnlyForModerator"`
	MuteOnStart             bool   `query:"muteOnStart"`
	GuestPolicy             string `query:"guestPolicy"` // ALWAYS_ACCEPT, ASK_MODERATOR
	MeetingKeepEvents       bool   `query:"meetingKeepEvents"`
	DisabledFeatures        string `query:"disabledFeatures"` //breakoutRooms,chat,externalVideos,polls,screenshare,sharedNotes,virtualBackgrounds,liveTranscription,presentation,virtualBackgrounds,raiseHand
	PreUploadedPresentation string `query:"preUploadedPresentation"`

	// few locks
	LockSettingsDisableCam         bool `query:"lockSettingsDisableCam"`
	LockSettingsDisableMic         bool `query:"lockSettingsDisableMic"`
	LockSettingsDisablePrivateChat bool `query:"lockSettingsDisablePrivateChat"`
	LockSettingsDisablePublicChat  bool `query:"lockSettingsDisablePublicChat"`
	LockSettingsDisableNotes       bool `query:"lockSettingsDisableNotes"`
	LockSettingsHideUserList       bool `query:"lockSettingsHideUserList"`

	// to avoid incompatibility
	VoiceBridge string `query:"voiceBridge"`
	DialNumber  string `query:"dialNumber"`
}

type CreateMeetingResp

type CreateMeetingResp struct {
	XMLName              xml.Name `xml:"response"`
	ReturnCode           string   `xml:"returncode"`
	MessageKey           string   `xml:"messageKey"`
	Message              string   `xml:"message"`
	MeetingID            string   `xml:"meetingID"`
	InternalMeetingID    string   `xml:"internalMeetingID"`
	ParentMeetingID      string   `xml:"parentMeetingID"`
	AttendeePW           string   `xml:"attendeePW"`  // Deprecated
	ModeratorPW          string   `xml:"moderatorPW"` // Deprecated
	CreateTime           int64    `xml:"createTime"`
	CreateDate           string   `xml:"createDate"`
	HasUserJoined        bool     `xml:"hasUserJoined"`
	Duration             int64    `xml:"duration"`
	VoiceBridge          string   `xml:"voiceBridge"`
	DialNumber           string   `xml:"dialNumber"`
	HasBeenForciblyEnded bool     `xml:"hasBeenForciblyEnded"`
}

type DeleteRecordingsReq

type DeleteRecordingsReq struct {
	RecordID string `query:"recordID"`
}

type DeleteRecordingsRes

type DeleteRecordingsRes struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"`
	Deleted    bool     `xml:"deleted"`
}

type GetMeetingsRes

type GetMeetingsRes struct {
	XMLName      xml.Name `xml:"response"`
	ReturnCode   string   `xml:"returncode"`
	MeetingsInfo struct {
		Meetings []*MeetingInfo `xml:"meeting"`
	} `xml:"meetings"`
}

type GetRecordingsReq

type GetRecordingsReq struct {
	MeetingID string `query:"meetingID"`
	RecordID  string `query:"recordID"`
	Offset    uint64 `query:"offset"`
	Limit     uint64 `query:"limit"`
}

type GetRecordingsRes

type GetRecordingsRes struct {
	XMLName        xml.Name `xml:"response"`
	ReturnCode     string   `xml:"returncode"`
	RecordingsInfo struct {
		Recordings []*RecordingInfo
	} `xml:"recordings"`
	Pagination *Pagination
}

type IsMeetingRunningRes

type IsMeetingRunningRes struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"`
	Running    bool     `xml:"running"`
}

type JoinMeetingReq

type JoinMeetingReq struct {
	FullName  string `query:"fullName"`
	MeetingID string `query:"meetingID"`
	Password  string `query:"password"` // Deprecated
	Role      string `query:"role"`     // MODERATOR or VIEWER
	UserID    string `query:"userID"`
	AvatarURL string `query:"avatarURL"`
	Redirect  string `query:"redirect"`
}

type JoinMeetingRes

type JoinMeetingRes struct {
	XMLName      xml.Name `xml:"response"`
	ReturnCode   string   `xml:"returncode"`
	MessageKey   string   `xml:"messageKey"`
	Message      string   `xml:"message"`
	MeetingID    string   `xml:"meeting_id"`
	SessionToken string   `xml:"session_token"`
	Url          string   `xml:"url"`
}

type MeetingInfo

type MeetingInfo struct {
	XMLName               xml.Name `xml:"meeting"`
	MeetingName           string   `xml:"meetingName"`
	MeetingID             string   `xml:"meetingID"`
	InternalMeetingID     string   `xml:"internalMeetingID"`
	CreateTime            int64    `xml:"createTime"`
	CreateDate            string   `xml:"createDate"`
	AttendeePW            string   `xml:"attendeePW"`  // Deprecated
	ModeratorPW           string   `xml:"moderatorPW"` // Deprecated
	Running               bool     `xml:"running"`
	Duration              uint32   `xml:"duration"`
	HasUserJoined         bool     `xml:"hasUserJoined"`
	Recording             bool     `xml:"recording"`
	HasBeenForciblyEnded  bool     `xml:"hasBeenForciblyEnded"`
	StartTime             int64    `xml:"startTime"`
	EndTime               int64    `xml:"endTime"`
	ParticipantCount      int64    `xml:"participantCount"`
	ListenerCount         int64    `xml:"listenerCount"`
	VoiceParticipantCount int64    `xml:"voiceParticipantCount"`
	VideoCount            int64    `xml:"videoCount"`
	MaxUsers              int64    `xml:"maxUsers"`
	ModeratorCount        int64    `xml:"moderatorCount"`
	AttendeesInfo         struct {
		Attendees []Attendee `xml:"attendee"`
	} `xml:"attendees"`
	IsBreakout bool        `xml:"isBreakout"`
	Metadata   MetadataMap `xml:"metadata"`
}

func ConvertActiveRoomInfoToBBBMeetingInfo

func ConvertActiveRoomInfoToBBBMeetingInfo(r *plugnmeet.ActiveRoomWithParticipant) *MeetingInfo

type MeetingInfoRes

type MeetingInfoRes struct {
	XMLName     xml.Name     `xml:"response"`
	ReturnCode  string       `xml:"returncode"`
	MeetingInfo *MeetingInfo `xml:",chardata"`
}

type MeetingReq

type MeetingReq struct {
	MeetingID string `query:"meetingID"`
}

type MetadataMap

type MetadataMap map[string]string

MetadataMap is a map[string]string.

func (MetadataMap) MarshalXML

func (s MetadataMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML marshals MetadataMap into XML.

type Pagination

type Pagination struct {
	XMLName       xml.Name `xml:"pagination"`
	Pageable      *PaginationPageable
	TotalElements uint64 `xml:"totalElements"`
	Empty         bool   `xml:"empty"`
}

type PaginationPageable

type PaginationPageable struct {
	XMLName xml.Name `xml:"pageable"`
	Offset  uint64   `xml:"offset"`
	Limit   uint64   `xml:"limit"`
	Paged   uint64   `xml:"paged"`
	Unpaged bool     `xml:"unpaged"`
}

type PlayBackFormat

type PlayBackFormat struct {
	XMLName        xml.Name `xml:"format"`
	Type           string   `xml:"type"`
	URL            string   `xml:"url"`
	ProcessingTime int64    `xml:"processingTime"`
	Length         int64    `xml:"length"`
	Size           int64    `xml:"size"`
	Preview        struct {
		Images struct {
			Image []PlayBackPreviewImage
		} `xml:"images"`
	} `xml:"preview"`
}

type PlayBackPreviewImage

type PlayBackPreviewImage struct {
	XMLName xml.Name `xml:"image"`
	Alt     string   `xml:"alt,attr"`
	Height  string   `xml:"height,attr"`
	Width   string   `xml:"width,attr"`
}

type PreUploadWhiteboardPostFile

type PreUploadWhiteboardPostFile struct {
	XMLName xml.Name `xml:"modules"`
	Module  struct {
		Name      string `xml:"name,attr"`
		Documents []struct {
			URL      string `xml:"url,attr"`
			Filename string `xml:"filename,attr"`
			Name     string `xml:"name,attr"`
		} `xml:"document"`
	} `xml:"module"`
}

type PublishRecordingsReq

type PublishRecordingsReq struct {
	RecordID string `query:"recordID"`
	Publish  bool   `query:"publish"`
}

type PublishRecordingsRes

type PublishRecordingsRes struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"`
	Published  bool     `xml:"published"`
}

type RecordingInfo

type RecordingInfo struct {
	XMLName           xml.Name    `xml:"recording"`
	RecordID          string      `xml:"recordID"`
	MeetingID         string      `xml:"meetingID"`
	InternalMeetingID string      `xml:"internalMeetingID"`
	Name              string      `xml:"name"`
	IsBreakout        bool        `xml:"isBreakout"`
	Published         bool        `xml:"published"`
	State             string      `xml:"state"`
	StartTime         int64       `xml:"startTime"`
	EndTime           int64       `xml:"endTime"`
	Participants      uint64      `xml:"participants"`
	RawSize           int64       `xml:"rawSize"`
	Size              int64       `xml:"size"`
	Metadata          MetadataMap `xml:"metadata"`
	Playback          struct {
		PlayBackFormat []PlayBackFormat
	} `xml:"playback"`
}

type UpdateRecordingsReq

type UpdateRecordingsReq struct {
	RecordID string `query:"recordID"`
}

type UpdateRecordingsRes

type UpdateRecordingsRes struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"`
	Updated    bool     `xml:"updated"`
}

Jump to

Keyboard shortcuts

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