Documentation
¶
Index ¶
- Constants
- Variables
- func MetaParam(name string) string
- type API
- type Attendee
- type Backend
- type Breakout
- type BreakoutInfo
- type BreakoutRoomStartedEvent
- type Client
- type CreateResponse
- type DeleteRecordingsResponse
- func (res *DeleteRecordingsResponse) Header() http.Header
- func (res *DeleteRecordingsResponse) Marshal() ([]byte, error)
- func (res *DeleteRecordingsResponse) Merge(other Response) error
- func (res *DeleteRecordingsResponse) SetHeader(h http.Header)
- func (res *DeleteRecordingsResponse) SetStatus(s int)
- func (res *DeleteRecordingsResponse) Status() int
- type EndResponse
- type Event
- type Format
- type Frontend
- type GetDefaultConfigXMLResponse
- func (res *GetDefaultConfigXMLResponse) Header() http.Header
- func (res *GetDefaultConfigXMLResponse) IsSuccess() bool
- func (res *GetDefaultConfigXMLResponse) Marshal() ([]byte, error)
- func (res *GetDefaultConfigXMLResponse) Merge(other Response) error
- func (res *GetDefaultConfigXMLResponse) SetHeader(h http.Header)
- func (res *GetDefaultConfigXMLResponse) SetStatus(s int)
- func (res *GetDefaultConfigXMLResponse) Status() int
- type GetMeetingInfoResponse
- func (res *GetMeetingInfoResponse) Header() http.Header
- func (res *GetMeetingInfoResponse) Marshal() ([]byte, error)
- func (res *GetMeetingInfoResponse) Merge(other Response) error
- func (res *GetMeetingInfoResponse) SetHeader(h http.Header)
- func (res *GetMeetingInfoResponse) SetStatus(s int)
- func (res *GetMeetingInfoResponse) Status() int
- type GetMeetingsResponse
- func (res *GetMeetingsResponse) Header() http.Header
- func (res *GetMeetingsResponse) Marshal() ([]byte, error)
- func (res *GetMeetingsResponse) Merge(other Response) error
- func (res *GetMeetingsResponse) SetHeader(h http.Header)
- func (res *GetMeetingsResponse) SetStatus(s int)
- func (res *GetMeetingsResponse) Status() int
- type GetRecordingTextTracksResponse
- func (res *GetRecordingTextTracksResponse) Header() http.Header
- func (res *GetRecordingTextTracksResponse) IsSuccess() bool
- func (res *GetRecordingTextTracksResponse) Marshal() ([]byte, error)
- func (res *GetRecordingTextTracksResponse) Merge(other Response) error
- func (res *GetRecordingTextTracksResponse) SetHeader(h http.Header)
- func (res *GetRecordingTextTracksResponse) SetStatus(s int)
- func (res *GetRecordingTextTracksResponse) Status() int
- type GetRecordingsResponse
- func (res *GetRecordingsResponse) Header() http.Header
- func (res *GetRecordingsResponse) Marshal() ([]byte, error)
- func (res *GetRecordingsResponse) Merge(other Response) error
- func (res *GetRecordingsResponse) SetHeader(h http.Header)
- func (res *GetRecordingsResponse) SetStatus(s int)
- func (res *GetRecordingsResponse) Status() int
- type Image
- type Images
- type IsMeetingRunningResponse
- func (res *IsMeetingRunningResponse) Header() http.Header
- func (res *IsMeetingRunningResponse) Marshal() ([]byte, error)
- func (res *IsMeetingRunningResponse) Merge(other Response) error
- func (res *IsMeetingRunningResponse) SetHeader(h http.Header)
- func (res *IsMeetingRunningResponse) SetStatus(s int)
- func (res *IsMeetingRunningResponse) Status() int
- type JSONResponse
- type JoinResponse
- func (res *JoinResponse) Header() http.Header
- func (res *JoinResponse) IsRaw() bool
- func (res *JoinResponse) Marshal() ([]byte, error)
- func (res *JoinResponse) Merge(other Response) error
- func (res *JoinResponse) RawResponse() []byte
- func (res *JoinResponse) SetHeader(h http.Header)
- func (res *JoinResponse) SetRaw(data []byte)
- func (res *JoinResponse) SetStatus(s int)
- func (res *JoinResponse) Status() int
- type Meeting
- type MeetingCreatedEvent
- type MeetingDestroyedEvent
- type MeetingEndedEvent
- type Metadata
- type Params
- func (p Params) Checksum() (string, bool)
- func (p Params) MarshalJSON() ([]byte, error)
- func (p Params) MeetingID() (string, bool)
- func (p Params) MeetingIDs() ([]string, bool)
- func (p Params) Publish() (bool, bool)
- func (p Params) RecordID() (string, bool)
- func (p Params) RecordIDs() ([]string, bool)
- func (p Params) States() ([]string, bool)
- func (p Params) String() string
- func (p Params) ToMetadata() Metadata
- type Preview
- type PublishRecordingsResponse
- func (res *PublishRecordingsResponse) Header() http.Header
- func (res *PublishRecordingsResponse) Marshal() ([]byte, error)
- func (res *PublishRecordingsResponse) Merge(other Response) error
- func (res *PublishRecordingsResponse) SetHeader(h http.Header)
- func (res *PublishRecordingsResponse) SetStatus(s int)
- func (res *PublishRecordingsResponse) Status() int
- type PutRecordingTextTrackResponse
- func (res *PutRecordingTextTrackResponse) Header() http.Header
- func (res *PutRecordingTextTrackResponse) IsSuccess() bool
- func (res *PutRecordingTextTrackResponse) Marshal() ([]byte, error)
- func (res *PutRecordingTextTrackResponse) Merge(other Response) error
- func (res *PutRecordingTextTrackResponse) SetHeader(h http.Header)
- func (res *PutRecordingTextTrackResponse) SetStatus(s int)
- func (res *PutRecordingTextTrackResponse) Status() int
- type Recording
- type RecordingMetadata
- type RecordingMetadataMeeting
- type RecordingMetadataPlayback
- type RecordingVisibility
- type Request
- func CreateRequest(params Params, body []byte) *Request
- func DeleteRecordingRequest(recordID string, params Params) *Request
- func DeleteRecordingsRequest(params Params) *Request
- func EndRequest(params Params) *Request
- func GetMeetingInfoRequest(params Params) *Request
- func GetMeetingsRequest(params Params) *Request
- func GetRecordingTextTracksRequest(params Params) *Request
- func GetRecordingsRequest(params Params) *Request
- func IsMeetingRunningRequest(params Params) *Request
- func JoinRequest(params Params) *Request
- func PublishRecordingRequest(recordID string, params Params) *Request
- func PublishRecordingsRequest(params Params) *Request
- func UnmarshalURLSafeRequest(data []byte) (req *Request, err error)
- func UpdateRecordingRequest(recordID string, params Params) *Request
- func UpdateRecordingsRequest(params Params) *Request
- func (req *Request) HasBody() bool
- func (req *Request) MarshalURLSafe() []byte
- func (req *Request) Sign() string
- func (req *Request) String() string
- func (req *Request) URL() string
- func (req *Request) Verify() error
- func (req *Request) WithBackend(b *Backend) *Request
- func (req *Request) WithFrontend(f *Frontend) *Request
- type Response
- type SetConfigXMLResponse
- func (res *SetConfigXMLResponse) Header() http.Header
- func (res *SetConfigXMLResponse) Marshal() ([]byte, error)
- func (res *SetConfigXMLResponse) Merge(other Response) error
- func (res *SetConfigXMLResponse) SetHeader(h http.Header)
- func (res *SetConfigXMLResponse) SetStatus(s int)
- func (res *SetConfigXMLResponse) Status() int
- type TextTrack
- type Timestamp
- type UpdateRecordingsResponse
- func (res *UpdateRecordingsResponse) Header() http.Header
- func (res *UpdateRecordingsResponse) Marshal() ([]byte, error)
- func (res *UpdateRecordingsResponse) Merge(other Response) error
- func (res *UpdateRecordingsResponse) SetHeader(h http.Header)
- func (res *UpdateRecordingsResponse) SetStatus(s int)
- func (res *UpdateRecordingsResponse) Status() int
- type UserJoinedMeetingEvent
- type UserLeftMeetingEvent
- type XMLResponse
- func (res *XMLResponse) Header() http.Header
- func (res *XMLResponse) IsSuccess() bool
- func (res *XMLResponse) Marshal() ([]byte, error)
- func (res *XMLResponse) Merge(other Response) error
- func (res *XMLResponse) MergeXMLResponse(other *XMLResponse) error
- func (res *XMLResponse) SetHeader(h http.Header)
- func (res *XMLResponse) SetStatus(s int)
- func (res *XMLResponse) Status() int
Constants ¶
const ( ResourceIndex = "" ResourceJoin = "join" ResourceCreate = "create" ResourceEnd = "end" ResourceIsMeetingRunning = "isMeetingRunning" ResourceGetMeetingInfo = "getMeetingInfo" ResourceGetMeetings = "getMeetings" ResourceUpdateRecordings = "updateRecordings" ResourceGetDefaultConfigXML = "getDefaultConfigXML" ResourceSetConfigXML = "setConfigXML" ResourceGetRecordings = "getRecordings" ResourceGetRecordingTextTracks = "getRecordingTextTracks" ResourcePutRecordingTextTrack = "putRecordingTextTrack" ResourceDeleteRecordings = "deleteRecordings" ResourcePublishRecordings = "publishRecordings" )
ApiResources
const ( RecordingFormatPresentation = "presentation" RecordingFormatVideo = "video" RecordingFormatPodcast = "podcast" )
Well known recoding formats
const ( ParamMeetingID = "meetingID" ParamName = "name" ParamChecksum = "checksum" ParamRecordID = "recordID" ParamPublish = "publish" ParamProtect = "protect" ParamState = "state" ParamListed = "gl-listed" ParamDisabledFeatures = "disabledFeatures" ParamMeetingEndedURL = "meetingEndedURL" MetaParamMeetingEndCallbackURL = "meta_endCallbackUrl" MetaParamRecordingReadyURL = "meta_bbb-recording-ready-url" )
Well known params
const ( // RetSuccess is the success return code RetSuccess = "SUCCESS" // RetFailed is the failure return code RetFailed = "FAILED" )
const ( // StatePublished is the state of recording, when published StatePublished = "published" // StateUnpublished is the state of an unpublished recording StateUnpublished = "unpublished" // StateAny indicates that a recording may be in any state. // This is intended for querying. StateAny = "any" )
Variables ¶
var ( // ErrCantBeMerged is the error when two responses // of the same type can not be merged, e.g. when // the data is not a collection. ErrCantBeMerged = errors.New( "responses of this type can not be merged") // ErrMergeConflict will be returned when two // responses differ in fields, where they should not. // Eg. a successful and a failed return code ErrMergeConflict = errors.New( "responses have conflicting values") )
var ( // ReQueryChecksum is used for removing the checksum // from a querystring in the incoming HTTP request ReQueryChecksum = regexp.MustCompile("&checksum(=[^&]*)?|^checksum(=[^&]*)?&?") )
Functions ¶
Types ¶
type API ¶
type API interface {
Join(*Request) (*JoinResponse, error)
Create(*Request) (*CreateResponse, error)
IsMeetingRunning(*Request) (*IsMeetingRunningResponse, error)
End(*Request) (*EndResponse, error)
GetMeetingInfo(*Request) (*GetMeetingInfoResponse, error)
GetMeetings(*Request) (*GetMeetingsResponse, error)
GetRecordings(*Request) (*GetRecordingsResponse, error)
PublishRecordings(*Request) (*PublishRecordingsResponse, error)
DeleteRecordings(*Request) (*DeleteRecordingsResponse, error)
UpdateRecordings(*Request) (*UpdateRecordingsResponse, error)
GetDefaultConfigXML(*Request) (*GetDefaultConfigXMLResponse, error)
SetConfigXML(*Request) (*SetConfigXMLResponse, error)
GetRecordingTextTracks(*Request) (*GetRecordingTextTracksResponse, error)
PutRecordingTextTrack(*Request) (*PutRecordingTextTrackResponse, error)
}
API is the bbb api interface
type Attendee ¶
type Attendee struct {
XMLName xml.Name `xml:"attendee" json:"-"`
UserID string `xml:"userID"`
InternalUserID string `xml:"internalUserID"`
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"`
}
Attendee of a meeting
type Backend ¶
type Backend struct {
Host string `` /* 136-byte string literal not displayed */
Secret string `json:"secret" doc:"The API secret for the BBB host."`
}
The Backend is a bbb backend a request can be directed to like Client.Do(Backend, Req).
type Breakout ¶
type Breakout struct {
XMLName xml.Name `xml:"breakout" json:"-"`
ParentMeetingID string `xml:"parentMeetingID"`
Sequence int `xml:"sequence"`
FreeJoin bool `xml:"freeJoin"`
}
Breakout info
type BreakoutInfo ¶
type BreakoutInfo struct {
Name string
ExternalID string
BreakoutID string
Sequence int
FreeJoin bool
}
BreakoutInfo contains breakout room information
type BreakoutRoomStartedEvent ¶
type BreakoutRoomStartedEvent struct {
ParentInternalMeetingID string
Breakout *BreakoutInfo
}
BreakoutRoomStartedEvent indicates the start of a breakout room
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client for communicating with a big blue button instance. Requests are signed and encoded. Responses are decoded.
type CreateResponse ¶
type CreateResponse struct {
*XMLResponse
*Meeting
}
CreateResponse is the resonse for the `create` API resource.
func UnmarshalCreateResponse ¶
func UnmarshalCreateResponse(data []byte) (*CreateResponse, error)
UnmarshalCreateResponse decodes the resonse XML data.
func (*CreateResponse) Header ¶
func (res *CreateResponse) Header() http.Header
Header returns the HTTP response headers
func (*CreateResponse) Marshal ¶
func (res *CreateResponse) Marshal() ([]byte, error)
Marshal a CreateResponse to XML
func (*CreateResponse) Merge ¶
func (res *CreateResponse) Merge(other Response) error
Merge another response
func (*CreateResponse) SetHeader ¶
func (res *CreateResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*CreateResponse) SetStatus ¶
func (res *CreateResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*CreateResponse) Status ¶
func (res *CreateResponse) Status() int
Status returns the HTTP response status code
type DeleteRecordingsResponse ¶
type DeleteRecordingsResponse struct {
*XMLResponse
Deleted bool `xml:"deleted"`
}
DeleteRecordingsResponse indicates if the recording was correctly deleted. Might fail successfully. Same crap as with the publish resource
func UnmarshalDeleteRecordingsResponse ¶
func UnmarshalDeleteRecordingsResponse( data []byte, ) (*DeleteRecordingsResponse, error)
UnmarshalDeleteRecordingsResponse decodes XML resource response
func (*DeleteRecordingsResponse) Header ¶
func (res *DeleteRecordingsResponse) Header() http.Header
Header returns the HTTP response headers
func (*DeleteRecordingsResponse) Marshal ¶
func (res *DeleteRecordingsResponse) Marshal() ([]byte, error)
Marshal encodes the delete recordings response as XML
func (*DeleteRecordingsResponse) Merge ¶
func (res *DeleteRecordingsResponse) Merge(other Response) error
Merge a DeleteRecordingsResponse
func (*DeleteRecordingsResponse) SetHeader ¶
func (res *DeleteRecordingsResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*DeleteRecordingsResponse) SetStatus ¶
func (res *DeleteRecordingsResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*DeleteRecordingsResponse) Status ¶
func (res *DeleteRecordingsResponse) Status() int
Status returns the HTTP response status code
type EndResponse ¶
type EndResponse struct {
*XMLResponse
}
EndResponse is the resonse of the end resource
func UnmarshalEndResponse ¶
func UnmarshalEndResponse(data []byte) (*EndResponse, error)
UnmarshalEndResponse decodes the xml resonse
func (*EndResponse) Header ¶
func (res *EndResponse) Header() http.Header
Header returns the HTTP response headers
func (*EndResponse) Marshal ¶
func (res *EndResponse) Marshal() ([]byte, error)
Marshal EndResponse to XML
func (*EndResponse) SetHeader ¶
func (res *EndResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*EndResponse) SetStatus ¶
func (res *EndResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*EndResponse) Status ¶
func (res *EndResponse) Status() int
Status returns the HTTP response status code
type Event ¶
type Event interface{}
An Event is an interface for BBB events. All events (that we care about) have a type and belong to a meeting.
type Format ¶
type Format struct {
XMLName xml.Name `xml:"format"`
Type string `xml:"type"`
URL string `xml:"url"`
ProcessingTime int `xml:"processingTime"` // No idea. The example is 7177.
Length int `xml:"length"`
Preview *Preview `xml:"preview"`
}
Format contains a link to the playable media
type Frontend ¶
type Frontend struct {
Key string `json:"key" doc:"The tenant is identified by the key, which is part of frontend specific API url." example:"greenlight01"`
Secret string `` /* 142-byte string literal not displayed */
}
The Frontend is a source for requests
type GetDefaultConfigXMLResponse ¶
type GetDefaultConfigXMLResponse struct {
Config []byte
// contains filtered or unexported fields
}
GetDefaultConfigXMLResponse has the raw config xml data
func UnmarshalGetDefaultConfigXMLResponse ¶
func UnmarshalGetDefaultConfigXMLResponse( data []byte, ) (*GetDefaultConfigXMLResponse, error)
UnmarshalGetDefaultConfigXMLResponse creates a new response from the data.
func (*GetDefaultConfigXMLResponse) Header ¶
func (res *GetDefaultConfigXMLResponse) Header() http.Header
Header returns the HTTP response headers
func (*GetDefaultConfigXMLResponse) IsSuccess ¶
func (res *GetDefaultConfigXMLResponse) IsSuccess() bool
IsSuccess checks if the returncode of the response is 'SUCCESS'.
func (*GetDefaultConfigXMLResponse) Marshal ¶
func (res *GetDefaultConfigXMLResponse) Marshal() ([]byte, error)
Marshal GetDefaultConfigXMLResponse encodes the response body which is just the data.
func (*GetDefaultConfigXMLResponse) Merge ¶
func (res *GetDefaultConfigXMLResponse) Merge(other Response) error
Merge GetDefaultConfigXMLResponse
func (*GetDefaultConfigXMLResponse) SetHeader ¶
func (res *GetDefaultConfigXMLResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*GetDefaultConfigXMLResponse) SetStatus ¶
func (res *GetDefaultConfigXMLResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*GetDefaultConfigXMLResponse) Status ¶
func (res *GetDefaultConfigXMLResponse) Status() int
Status returns the HTTP response status code
type GetMeetingInfoResponse ¶
type GetMeetingInfoResponse struct {
*XMLResponse
*Meeting
}
GetMeetingInfoResponse contains detailed meeting information
func UnmarshalGetMeetingInfoResponse ¶
func UnmarshalGetMeetingInfoResponse( data []byte, ) (*GetMeetingInfoResponse, error)
UnmarshalGetMeetingInfoResponse decodes the xml response
func (*GetMeetingInfoResponse) Header ¶
func (res *GetMeetingInfoResponse) Header() http.Header
Header returns the HTTP response headers
func (*GetMeetingInfoResponse) Marshal ¶
func (res *GetMeetingInfoResponse) Marshal() ([]byte, error)
Marshal GetMeetingInfoResponse to XML
func (*GetMeetingInfoResponse) Merge ¶
func (res *GetMeetingInfoResponse) Merge(other Response) error
Merge GetMeetingInfoResponse
func (*GetMeetingInfoResponse) SetHeader ¶
func (res *GetMeetingInfoResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*GetMeetingInfoResponse) SetStatus ¶
func (res *GetMeetingInfoResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*GetMeetingInfoResponse) Status ¶
func (res *GetMeetingInfoResponse) Status() int
Status returns the HTTP response status code
type GetMeetingsResponse ¶
type GetMeetingsResponse struct {
*XMLResponse
Meetings []*Meeting `xml:"meetings>meeting"`
}
GetMeetingsResponse contains a list of meetings.
func UnmarshalGetMeetingsResponse ¶
func UnmarshalGetMeetingsResponse( data []byte, ) (*GetMeetingsResponse, error)
UnmarshalGetMeetingsResponse decodes the xml response
func (*GetMeetingsResponse) Header ¶
func (res *GetMeetingsResponse) Header() http.Header
Header returns the HTTP response headers
func (*GetMeetingsResponse) Marshal ¶
func (res *GetMeetingsResponse) Marshal() ([]byte, error)
Marshal serializes the response as XML
func (*GetMeetingsResponse) Merge ¶
func (res *GetMeetingsResponse) Merge(other Response) error
Merge get meetings responses
func (*GetMeetingsResponse) SetHeader ¶
func (res *GetMeetingsResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*GetMeetingsResponse) SetStatus ¶
func (res *GetMeetingsResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*GetMeetingsResponse) Status ¶
func (res *GetMeetingsResponse) Status() int
Status returns the HTTP response status code
type GetRecordingTextTracksResponse ¶
type GetRecordingTextTracksResponse struct {
Returncode string `json:"returncode"`
MessageKey string `json:"messageKey,omitempty"`
Message string `json:"message,omitempty"`
Tracks []*TextTrack `json:"tracks"`
// contains filtered or unexported fields
}
GetRecordingTextTracksResponse lists all tracks
func UnmarshalGetRecordingTextTracksResponse ¶
func UnmarshalGetRecordingTextTracksResponse( data []byte, ) (*GetRecordingTextTracksResponse, error)
UnmarshalGetRecordingTextTracksResponse decodes the json
func (*GetRecordingTextTracksResponse) Header ¶
func (res *GetRecordingTextTracksResponse) Header() http.Header
Header returns the HTTP response headers
func (*GetRecordingTextTracksResponse) IsSuccess ¶
func (res *GetRecordingTextTracksResponse) IsSuccess() bool
IsSuccess checks if the returncode of the response is 'SUCCESS'.
func (*GetRecordingTextTracksResponse) Marshal ¶
func (res *GetRecordingTextTracksResponse) Marshal() ([]byte, error)
Marshal GetRecordingTextTracksResponse to JSON
func (*GetRecordingTextTracksResponse) Merge ¶
func (res *GetRecordingTextTracksResponse) Merge(other Response) error
Merge GetRecordingTextTracksResponse
func (*GetRecordingTextTracksResponse) SetHeader ¶
func (res *GetRecordingTextTracksResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response header
func (*GetRecordingTextTracksResponse) SetStatus ¶
func (res *GetRecordingTextTracksResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*GetRecordingTextTracksResponse) Status ¶
func (res *GetRecordingTextTracksResponse) Status() int
Status returns the HTTP response status code
type GetRecordingsResponse ¶
type GetRecordingsResponse struct {
*XMLResponse
Recordings []*Recording `xml:"recordings>recording"`
}
GetRecordingsResponse is the response of the getRecordings resource
func UnmarshalGetRecordingsResponse ¶
func UnmarshalGetRecordingsResponse( data []byte, ) (*GetRecordingsResponse, error)
UnmarshalGetRecordingsResponse deserializes the response XML
func (*GetRecordingsResponse) Header ¶
func (res *GetRecordingsResponse) Header() http.Header
Header returns the HTTP response headers
func (*GetRecordingsResponse) Marshal ¶
func (res *GetRecordingsResponse) Marshal() ([]byte, error)
Marshal a GetRecordingsResponse to XML
func (*GetRecordingsResponse) Merge ¶
func (res *GetRecordingsResponse) Merge(other Response) error
Merge another GetRecordingsResponse
func (*GetRecordingsResponse) SetHeader ¶
func (res *GetRecordingsResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*GetRecordingsResponse) SetStatus ¶
func (res *GetRecordingsResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*GetRecordingsResponse) Status ¶
func (res *GetRecordingsResponse) Status() int
Status returns the HTTP response status code
type Image ¶
type Image struct {
XMLName xml.Name `xml:"image"`
Alt string `xml:"alt,attr,omitempty"`
Height int `xml:"height,attr,omitempty"`
Width int `xml:"width,attr,omitempty"`
URL string `xml:",chardata"`
}
Image is a preview image of the format
type IsMeetingRunningResponse ¶
type IsMeetingRunningResponse struct {
*XMLResponse
Running bool `xml:"running"`
}
IsMeetingRunningResponse is a meeting status resonse
func UnmarshalIsMeetingRunningResponse ¶
func UnmarshalIsMeetingRunningResponse( data []byte, ) (*IsMeetingRunningResponse, error)
UnmarshalIsMeetingRunningResponse decodes the XML data.
func (*IsMeetingRunningResponse) Header ¶
func (res *IsMeetingRunningResponse) Header() http.Header
Header returns the HTTP response headers
func (*IsMeetingRunningResponse) Marshal ¶
func (res *IsMeetingRunningResponse) Marshal() ([]byte, error)
Marshal a IsMeetingRunningResponse to XML
func (*IsMeetingRunningResponse) Merge ¶
func (res *IsMeetingRunningResponse) Merge(other Response) error
Merge IsMeetingRunning responses
func (*IsMeetingRunningResponse) SetHeader ¶
func (res *IsMeetingRunningResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*IsMeetingRunningResponse) SetStatus ¶
func (res *IsMeetingRunningResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*IsMeetingRunningResponse) Status ¶
func (res *IsMeetingRunningResponse) Status() int
Status returns the HTTP response status code
type JSONResponse ¶
type JSONResponse struct {
Response interface{} `json:"response"`
}
JSONResponse encapsulates a json reponse
type JoinResponse ¶
type JoinResponse struct {
*XMLResponse
MeetingID string `xml:"meeting_id"`
UserID string `xml:"user_id"`
AuthToken string `xml:"auth_token"`
SessionToken string `xml:"session_token"`
URL string `xml:"url"`
// contains filtered or unexported fields
}
JoinResponse of the join resource. WARNING: the join response might be a html page without any meaningful data.
func UnmarshalJoinResponse ¶
func UnmarshalJoinResponse(data []byte) (*JoinResponse, error)
UnmarshalJoinResponse decodes the serialized XML data
func (*JoinResponse) Header ¶
func (res *JoinResponse) Header() http.Header
Header returns the HTTP response headers
func (*JoinResponse) IsRaw ¶
func (res *JoinResponse) IsRaw() bool
IsRaw returns true if the response could not be decoded from XML data
func (*JoinResponse) Marshal ¶
func (res *JoinResponse) Marshal() ([]byte, error)
Marshal encodes a JoinResponse as XML
func (*JoinResponse) Merge ¶
func (res *JoinResponse) Merge(other Response) error
Merge another response
func (*JoinResponse) RawResponse ¶ added in v1.1.1
func (res *JoinResponse) RawResponse() []byte
RawResponse returns the raw response data
func (*JoinResponse) SetHeader ¶
func (res *JoinResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*JoinResponse) SetRaw ¶
func (res *JoinResponse) SetRaw(data []byte)
SetRaw will set a raw content
func (*JoinResponse) SetStatus ¶
func (res *JoinResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*JoinResponse) Status ¶
func (res *JoinResponse) Status() int
Status returns the HTTP response status code
type Meeting ¶
type Meeting struct {
XMLName xml.Name `xml:"meeting" json:"-"`
MeetingName string `xml:"meetingName"`
MeetingID string `xml:"meetingID"`
InternalMeetingID string `xml:"internalMeetingID"`
CreateTime Timestamp `xml:"createTime"`
CreateDate string `xml:"createDate"`
VoiceBridge string `xml:"voiceBridge"`
DialNumber string `xml:"dialNumber"`
AttendeePW string `xml:"attendeePW"`
ModeratorPW string `xml:"moderatorPW"`
Running bool `xml:"running"`
Duration int `xml:"duration"`
Recording bool `xml:"recording"`
HasBeenForciblyEnded bool `xml:"hasBeenForciblyEnded"`
StartTime Timestamp `xml:"startTime"`
EndTime Timestamp `xml:"endTime"`
ParticipantCount int `xml:"participantCount"`
ListenerCount int `xml:"listenerCount"`
VoiceParticipantCount int `xml:"voiceParticipantCount"`
VideoCount int `xml:"videoCount"`
MaxUsers int `xml:"maxUsers"`
ModeratorCount int `xml:"moderatorCount"`
IsBreakout bool `xml:"isBreakout"`
Metadata Metadata `xml:"metadata"`
Attendees []*Attendee `xml:"attendees>attendee"`
BreakoutRooms []string `xml:"breakoutRooms>breakout"`
Breakout *Breakout `xml:"breakout"`
}
Meeting information
type MeetingCreatedEvent ¶
MeetingCreatedEvent indicates the start of a meeting
type MeetingDestroyedEvent ¶
type MeetingDestroyedEvent struct {
InternalMeetingID string
}
MeetingDestroyedEvent indicates a meeting destroyed
type MeetingEndedEvent ¶
type MeetingEndedEvent struct {
InternalMeetingID string
}
MeetingEndedEvent indicates the end of a meeting
type Metadata ¶
Metadata about the BBB instance, this is not exactly specified in the docs, so we are using a map with string keys and an empty interface for the values.
func (Metadata) MarshalXML ¶
MarshalXML encodes Metadata as XML
func (*Metadata) UnmarshalXML ¶
UnmarshalXML decodes an unordered key, value mapping from XML.
type Params ¶
Params for the BBB API (we opt for stringly typed.)
func (Params) MarshalJSON ¶
MarshalJSON is a custom implementation of the interface to omit empty values.
func (Params) MeetingID ¶
MeetingID retrievs the well known meeting id value from the set of params.
func (Params) MeetingIDs ¶
MeetingIDs interprets the MeetingsID parameter as a comma separated set of meeting ids.
func (Params) RecordIDs ¶
RecordIDs retrieves the well known recordID param It is always a list interally
func (Params) States ¶
States retrievs a set of states from the `state` param. The parameter state can be used to filter results. It can be a set of states separate by commas.
func (Params) String ¶
String of the query parameters. The order of the parameters is made deterministic.
func (Params) ToMetadata ¶
ToMetadata converts meta_ params into Metadata
type PublishRecordingsResponse ¶
type PublishRecordingsResponse struct {
*XMLResponse
Published bool `xml:"published"`
}
PublishRecordingsResponse indicates if the recordings were published. This also has the potential for tasks failed successfully. Also the endpoint is designed badly because you can send a set of recordings and receive just a single published true or false.
func UnmarshalPublishRecordingsResponse ¶
func UnmarshalPublishRecordingsResponse( data []byte, ) (*PublishRecordingsResponse, error)
UnmarshalPublishRecordingsResponse decodes the XML response
func (*PublishRecordingsResponse) Header ¶
func (res *PublishRecordingsResponse) Header() http.Header
Header returns the HTTP response headers
func (*PublishRecordingsResponse) Marshal ¶
func (res *PublishRecordingsResponse) Marshal() ([]byte, error)
Marshal a publishRecodingsResponse to XML
func (*PublishRecordingsResponse) Merge ¶
func (res *PublishRecordingsResponse) Merge(other Response) error
Merge a PublishRecordingsResponse
func (*PublishRecordingsResponse) SetHeader ¶
func (res *PublishRecordingsResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*PublishRecordingsResponse) SetStatus ¶
func (res *PublishRecordingsResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*PublishRecordingsResponse) Status ¶
func (res *PublishRecordingsResponse) Status() int
Status returns the HTTP response status code
type PutRecordingTextTrackResponse ¶
type PutRecordingTextTrackResponse struct {
Returncode string `json:"returncode"`
MessageKey string `json:"messageKey,omitempty"`
Message string `json:"message,omitempty"`
RecordID string `json:"recordId,omitempty"`
// contains filtered or unexported fields
}
PutRecordingTextTrackResponse is the response when uploading a text track. Response is in JSON.
func UnmarshalPutRecordingTextTrackResponse ¶
func UnmarshalPutRecordingTextTrackResponse( data []byte, ) (*PutRecordingTextTrackResponse, error)
UnmarshalPutRecordingTextTrackResponse decodes the json response
func (*PutRecordingTextTrackResponse) Header ¶
func (res *PutRecordingTextTrackResponse) Header() http.Header
Header returns the HTTP response headers
func (*PutRecordingTextTrackResponse) IsSuccess ¶
func (res *PutRecordingTextTrackResponse) IsSuccess() bool
IsSuccess checks if the returncode of the response is 'SUCCESS'.
func (*PutRecordingTextTrackResponse) Marshal ¶
func (res *PutRecordingTextTrackResponse) Marshal() ([]byte, error)
Marshal a PutRecordingTextTrackResponse to JSON
func (*PutRecordingTextTrackResponse) Merge ¶
func (res *PutRecordingTextTrackResponse) Merge(other Response) error
Merge a put recording text track
func (*PutRecordingTextTrackResponse) SetHeader ¶
func (res *PutRecordingTextTrackResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response header
func (*PutRecordingTextTrackResponse) SetStatus ¶
func (res *PutRecordingTextTrackResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*PutRecordingTextTrackResponse) Status ¶
func (res *PutRecordingTextTrackResponse) Status() int
Status returns the HTTP response status code
type Recording ¶
type Recording 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 Timestamp `xml:"startTime"`
EndTime Timestamp `xml:"endTime"`
Participants int `xml:"participants"`
Metadata Metadata `xml:"metadata"`
Formats []*Format `xml:"playback>format"`
}
Recording is a recorded bbb session
func (*Recording) Protect ¶ added in v1.1.0
Protect will update the link to the presentation to point back to the b3scale instance, with a request token that will be exchanged into an access token.
The default lifetime is an hour.
As a subject, the frontendID will most likely be used, but it could be any identifier.
func (*Recording) SetPlaybackHost ¶
SetPlaybackHost will update the link to the presentation and preview thumbnails
func (*Recording) SetVisibility ¶ added in v1.3.0
func (r *Recording) SetVisibility(v RecordingVisibility)
SetVisibility updates all attributes of the recording encoding the visibility.
type RecordingMetadata ¶
type RecordingMetadata struct {
XMLName xml.Name `xml:"recording"`
RecordID string `xml:"id"`
State string `xml:"state"`
Published bool `xml:"published"`
StartTime Timestamp `xml:"start_time"`
EndTime Timestamp `xml:"end_time"`
Participants int `xml:"participants"`
Meeting *RecordingMetadataMeeting `xml:"meeting"`
Meta Metadata `xml:"meta"`
Playback *RecordingMetadataPlayback `xml:"playback"`
RawSize int `xml:"raw_size"`
}
RecordingMetadata can be parsed from a metadata.xml by posting it to the API endpoint in the bbb recordings hook.
func UnmarshalRecordingMetadata ¶
func UnmarshalRecordingMetadata( data []byte, ) (*RecordingMetadata, error)
UnmarshalRecordingMetadata deserializes bytes
func (*RecordingMetadata) ToRecording ¶
func (m *RecordingMetadata) ToRecording() *Recording
ToRecording converts a recording metadata into a recording
type RecordingMetadataMeeting ¶
type RecordingMetadataMeeting struct {
InternalMeetingID string `xml:"id,attr"`
MeetingID string `xml:"externalId,attr"`
Name string `xml:"name,attr"`
Breakout bool `xml:"breakout,attr"`
}
RecordingMetadataMeeting encodes the meeting information from the recordings metadata.xml
type RecordingMetadataPlayback ¶
type RecordingMetadataPlayback struct {
XMLName xml.Name `xml:"playback"`
Format string `xml:"format"`
Link string `xml:"link"`
ProcessingTime int `xml:"processing_time"`
Duration int `xml:"duration"`
Size int `xml:"size"`
}
RecordingMetadataPlayback contains the playback format
type RecordingVisibility ¶ added in v1.3.0
type RecordingVisibility int
RecordingVisibility is an enum represeting the visibility of the recording: Published, Unpublished, Protected
const ( RecordingVisibilityUnpublished RecordingVisibility = iota RecordingVisibilityPublished RecordingVisibilityProtected RecordingVisibilityPublic RecordingVisibilityPublicProtected )
The recording visibility affects the state of the recording as in 'published' / 'unpublished', the 'protection' and the 'gl-listed' meta-parameter ('public').
func ParseRecordingVisibility ¶ added in v1.3.0
func ParseRecordingVisibility(s string) (RecordingVisibility, error)
ParseRecordingVisibility resolves the recording visibility key into the enum value.
func (RecordingVisibility) MarshalJSON ¶ added in v1.3.0
func (v RecordingVisibility) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaler interface for serializing a recording visibility.
func (RecordingVisibility) String ¶ added in v1.3.0
func (v RecordingVisibility) String() string
String implements the stringer interface for recording visibilty.
func (*RecordingVisibility) UnmarshalJSON ¶ added in v1.3.0
func (v *RecordingVisibility) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the Unmarshaler interface for deserializing a recording visibility.
type Request ¶
type Request struct {
*http.Request
Resource string
Params Params
Body []byte
Checksum string
Backend *Backend
Frontend *Frontend
}
Request is a bbb request as decoded from the incoming url - but can be directly passed on to a BigBlueButton server.
It is associated with a backend and a frontend.
func CreateRequest ¶
CreateRequest creates a new create request
func DeleteRecordingRequest ¶
DeleteRecordingRequest creates a request for deleting a single recording. CAVEAT: Updates the params's recordID.
func DeleteRecordingsRequest ¶
DeleteRecordingsRequest creates a request deleting recordings from a backend.
func GetMeetingInfoRequest ¶
GetMeetingInfoRequest creates a new getMeetingInfo request
func GetMeetingsRequest ¶
GetMeetingsRequest builds a new getMeetings request
func GetRecordingTextTracksRequest ¶
GetRecordingTextTracksRequest creates a new getRecordingTextTracks request
func GetRecordingsRequest ¶
GetRecordingsRequest creates a new getRecordings request
func IsMeetingRunningRequest ¶
IsMeetingRunningRequest makes a new isMeetingRunning request
func PublishRecordingRequest ¶
PublishRecordingRequest creates a single publish request for a recording. CAVEAT: Mutates the parameters by asserting the recordID is set to the given recordID.
func PublishRecordingsRequest ¶
PublishRecordingsRequest creates a new request for publishing recordings on a backend.
func UnmarshalURLSafeRequest ¶
UnmarshalURLSafeRequest will decode an encoded request. Remember not to trust any user data! THIS IS NOT SIGNED.
func UpdateRecordingRequest ¶
UpdateRecordingRequest creates a request for updating a single recording. CAVEAT: It updates the recordID in params.
func UpdateRecordingsRequest ¶
UpdateRecordingsRequest creates a new request for updating a recording.
func (*Request) MarshalURLSafe ¶
MarshalURLSafe will encode the request in an urlsafe way using json+base64.
func (*Request) Verify ¶
Verify request coming from a frontend: Compare checksum with the checksum calculated from the incoming raw query string and the frontend secret
func (*Request) WithBackend ¶
WithBackend adds a backend to the request
func (*Request) WithFrontend ¶
WithFrontend adds a frontend to the request
type Response ¶
type Response interface {
Marshal() ([]byte, error)
Merge(response Response) error
Header() http.Header
SetHeader(http.Header)
Status() int
SetStatus(int)
IsSuccess() bool
}
Response interface
type SetConfigXMLResponse ¶
type SetConfigXMLResponse struct {
*XMLResponse
Token string `xml:"token"`
}
SetConfigXMLResponse encodes the result of setting the config
func UnmarshalSetConfigXMLResponse ¶
func UnmarshalSetConfigXMLResponse( data []byte, ) (*SetConfigXMLResponse, error)
UnmarshalSetConfigXMLResponse decodes the XML data
func (*SetConfigXMLResponse) Header ¶
func (res *SetConfigXMLResponse) Header() http.Header
Header returns the HTTP response headers
func (*SetConfigXMLResponse) Marshal ¶
func (res *SetConfigXMLResponse) Marshal() ([]byte, error)
Marshal encodes a SetConfigXMLResponse as XML
func (*SetConfigXMLResponse) Merge ¶
func (res *SetConfigXMLResponse) Merge(other Response) error
Merge SetConfigXMLResponse
func (*SetConfigXMLResponse) SetHeader ¶
func (res *SetConfigXMLResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*SetConfigXMLResponse) SetStatus ¶
func (res *SetConfigXMLResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*SetConfigXMLResponse) Status ¶
func (res *SetConfigXMLResponse) Status() int
Status returns the HTTP response status code
type TextTrack ¶
type TextTrack struct {
Href string `json:"href"`
Kind string `json:"kind"`
Label string `json:"label"`
Source string `json:"source"`
}
TextTrack of a Recording
type Timestamp ¶
type Timestamp uint64
Timestamp is the milliseconds passed since beginning of the epoch.
type UpdateRecordingsResponse ¶
type UpdateRecordingsResponse struct {
*XMLResponse
Updated bool `xml:"updated"`
}
UpdateRecordingsResponse indicates if the update was successful in the attribute updated. Might be different from Returncode. I guess.
func UnmarshalUpdateRecordingsResponse ¶
func UnmarshalUpdateRecordingsResponse( data []byte, ) (*UpdateRecordingsResponse, error)
UnmarshalUpdateRecordingsResponse decodes the XML data
func (*UpdateRecordingsResponse) Header ¶
func (res *UpdateRecordingsResponse) Header() http.Header
Header returns the HTTP response headers
func (*UpdateRecordingsResponse) Marshal ¶
func (res *UpdateRecordingsResponse) Marshal() ([]byte, error)
Marshal UpdateRecordingsResponse to XML
func (*UpdateRecordingsResponse) Merge ¶
func (res *UpdateRecordingsResponse) Merge(other Response) error
Merge a UpdateRecordingsResponse
func (*UpdateRecordingsResponse) SetHeader ¶
func (res *UpdateRecordingsResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*UpdateRecordingsResponse) SetStatus ¶
func (res *UpdateRecordingsResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*UpdateRecordingsResponse) Status ¶
func (res *UpdateRecordingsResponse) Status() int
Status returns the HTTP response status code
type UserJoinedMeetingEvent ¶
UserJoinedMeetingEvent indicates that a user joined the meeting
type UserLeftMeetingEvent ¶
type UserLeftMeetingEvent struct {
InternalMeetingID string
InternalUserID string
InternalID string
}
UserLeftMeetingEvent indicates that a user has left the meeting
type XMLResponse ¶
type XMLResponse struct {
XMLName xml.Name `xml:"response"`
Returncode string `xml:"returncode"`
Message string `xml:"message,omitempty"`
MessageKey string `xml:"messageKey,omitempty"`
Version string `xml:"version,omitempty"`
// contains filtered or unexported fields
}
A XMLResponse from the server
func (*XMLResponse) Header ¶
func (res *XMLResponse) Header() http.Header
Header returns the HTTP response headers
func (*XMLResponse) IsSuccess ¶
func (res *XMLResponse) IsSuccess() bool
IsSuccess checks if the returncode of the response is 'SUCCESS'.
func (*XMLResponse) Marshal ¶
func (res *XMLResponse) Marshal() ([]byte, error)
Marshal a XMLResponse to XML
func (*XMLResponse) Merge ¶
func (res *XMLResponse) Merge(other Response) error
Merge XMLResponses. However, in general this should not be merged.
func (*XMLResponse) MergeXMLResponse ¶
func (res *XMLResponse) MergeXMLResponse(other *XMLResponse) error
MergeXMLResponse is a specific merge
func (*XMLResponse) SetHeader ¶
func (res *XMLResponse) SetHeader(h http.Header)
SetHeader sets the HTTP response headers
func (*XMLResponse) SetStatus ¶
func (res *XMLResponse) SetStatus(s int)
SetStatus sets the HTTP response status code
func (*XMLResponse) Status ¶
func (res *XMLResponse) Status() int
Status returns the HTTP response status code