bbb

package
v0.0.0-...-61cf9d3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: AGPL-3.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ResourceIndex                  = ""
	ResourceJoin                   = "join"
	ResourceCreate                 = "create"
	ResourceIsMeetingRunning       = "isMeetingRunning"
	ResourceEnd                    = "end"
	ResourceGetMeetingInfo         = "getMeetingInfo"
	ResourceGetMeetings            = "getMeetings"
	ResourceGetRecordings          = "getRecordings"
	ResourcePublishRecordings      = "publishRecordings"
	ResourceDeleteRecordings       = "deleteRecordings"
	ResourceUpdateRecordings       = "updateRecordings"
	ResourceGetDefaultConfigXML    = "getDefaultConfigXML"
	ResourceSetConfigXML           = "setConfigXML"
	ResourceGetRecordingTextTracks = "getRecordingTextTracks"
	ResourcePutRecordingTextTrack  = "putRecordingTextTrack"
)

ApiResources

View Source
const (
	ParamMeetingID = "meetingID"
	ParamChecksum  = "checksum"
)

Well known params

View Source
const (

	// RetSuccess is the success return code
	RetSuccess = "SUCCESS"

	// RetFailed is the failure return code
	RetFailed = "FAILED"
)

Variables

View Source
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")
)
View Source
var (
	// ReQueryChecksum is used for removing the checksum
	// from a querystring in the incoming HTTP request
	ReQueryChecksum = regexp.MustCompile("&checksum(=[^&]*)?|^checksum(=[^&]*)?&?")
)

Functions

This section is empty.

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"`
	UserID          string   `xml:"userID"`
	InternalUserID  string   `xml:"internalUserID,omit"`
	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 `json:"host"`
	Secret string `json:"secret"`
}

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"`
	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.

func NewClient

func NewClient() *Client

NewClient creates and configures a new http client and creates the big blue client object.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *Request) (Response, error)

Do sends the request to the backend. The request is signed. The response is decoded into a BBB response.

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) Merge

func (res *EndResponse) Merge(other Response) error

Merge EndResponses

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"`
	Secret string `json:"secret"`
}

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) 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

Header returns the HTTP response headers

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"`
	Height  int      `xml:"height,attr"`
	Width   int      `xml:"width,attr"`
}

Image is a preview image of the format

type Images

type Images struct {
	XMLName xml.Name `xml:"images"`
	All     []*Image `xml:"image"`
}

Images is a collection of Image

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) 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"`
	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

func (*Meeting) String

func (m *Meeting) String() string

func (*Meeting) Update

func (m *Meeting) Update(update *Meeting) error

Update the meeting info with new data

type MeetingCreatedEvent

type MeetingCreatedEvent struct {
	MeetingID         string
	InternalMeetingID string
}

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

type Metadata map[string]string

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

func (meta Metadata) MarshalXML(
	e *xml.Encoder,
	start xml.StartElement,
) error

MarshalXML encodes Metadata as XML

func (*Metadata) UnmarshalXML

func (meta *Metadata) UnmarshalXML(
	d *xml.Decoder, start xml.StartElement,
) error

UnmarshalXML decodes an unordered key, value mapping from XML.

type Params

type Params map[string]string

Params for the BBB API (we opt for stringly typed.)

func (Params) Checksum

func (p Params) Checksum() (string, bool)

Checksum retrievs the well known checksum param

func (Params) MeetingID

func (p Params) MeetingID() (string, bool)

MeetingID retrievs the well known meeting id value from the set of params.

func (Params) String

func (p Params) String() string

String of the query parameters. The order of the parameters is made deterministic.

type Preview

type Preview struct {
	XMLName xml.Name `xml:"preview"`
	Images  *Images  `xml:"images"`
}

Preview contains a list of images

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

Header returns the HTTP response headers

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

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

func CreateRequest(params Params, body []byte) *Request

CreateRequest creates a new create request

func EndRequest

func EndRequest(params Params) *Request

EndRequest creates a meeting end request

func GetMeetingInfoRequest

func GetMeetingInfoRequest(params Params) *Request

GetMeetingInfoRequest creates a new getMeetingInfo request

func GetMeetingsRequest

func GetMeetingsRequest(params Params) *Request

GetMeetingsRequest builds a new getMeetings request

func IsMeetingRunningRequest

func IsMeetingRunningRequest(params Params) *Request

IsMeetingRunningRequest makes a new isMeetingRunning request

func JoinRequest

func JoinRequest(params Params) *Request

JoinRequest creates a new join request

func UnmarshalURLSafeRequest

func UnmarshalURLSafeRequest(data []byte) (req *Request, err error)

UnmarshalURLSafeRequest will decode an encoded request. Remember not to trust any user data! THIS IS NOT SIGNED.

func (*Request) HasBody

func (req *Request) HasBody() bool

HasBody checks for the presence of a request body

func (*Request) MarshalURLSafe

func (req *Request) MarshalURLSafe() []byte

MarshalURLSafe will encode the request in an urlsafe way using json+base64.

func (*Request) Sign

func (req *Request) Sign() string

Sign a request, with the backend secret.

func (*Request) URL

func (req *Request) URL() string

URL builds the URL representation of the request, directed at a backend.

func (*Request) Verify

func (req *Request) Verify() error

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

func (req *Request) WithBackend(b *Backend) *Request

WithBackend adds a backend to the request

func (*Request) WithFrontend

func (req *Request) WithFrontend(f *Frontend) *Request

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)
}

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 time.Time

Timestamp is the milliseconds passed since beginning of the epoch.

func (Timestamp) MarshalXML

func (t Timestamp) MarshalXML(
	e *xml.Encoder,
	start xml.StartElement,
) error

MarshalXML encodes the timestamp into XML data

func (Timestamp) String

func (t Timestamp) String() string

String of timestamp, use time.Time.String

func (*Timestamp) UnmarshalXML

func (t *Timestamp) UnmarshalXML(
	d *xml.Decoder,
	start xml.StartElement,
) error

UnmarshalXML decodes the timestamp from XML data

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

type UserJoinedMeetingEvent struct {
	InternalMeetingID string
	Attendee          *Attendee
}

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) 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

Jump to

Keyboard shortcuts

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