api

package
v3.0.0-...-635f31c Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package api manage the bigbluebutton api and communication between bigblueswarm and bigbluebutton instances

Package api manage the bigbluebutton api and communication between bigblueswarm and bigbluebutton instances

Package api manage the bigbluebutton api and communication between bigblueswarm and bigbluebutton instances

Package api manage the bigbluebutton api and communication between bigblueswarm and bigbluebutton instances

Package api manage the bigbluebutton api and communication between bigblueswarm and bigbluebutton instances

Package api manage the bigbluebutton api and communication between bigblueswarm and bigbluebutton instances

Index

Constants

View Source
const API = "api"

API is the sub-endpoint for the API

View Source
const BigBlueButton = "bigbluebutton"

BigBlueButton is the main endpoint for the API

View Source
const Create = "create"

Create is the sub-endpoint for creating a meeting

View Source
const DeleteRecordings = "deleteRecordings"

DeleteRecordings is the sub-endpoint for deleting a recording

View Source
const End = "end"

End is the sub-endpoint for ending a meeting

View Source
const GetMeetingInfo = "getMeetingInfo"

GetMeetingInfo is the sub-endpoint for getting a meeting info

View Source
const GetMeetings = "getMeetings"

GetMeetings is the sub-endpoint for getting a list of meetings

View Source
const GetRecordings = "getRecordings"

GetRecordings is the sub-endpoint for getting a list of recordings

View Source
const GetRecordingsTextTracks = "getRecordingTextTracks"

GetRecordingsTextTracks is the sub-endpoint for getting a list of text tracks

View Source
const IsMeetingRunning = "isMeetingRunning"

IsMeetingRunning is the sub-endpoint for checking if a meeting is running

View Source
const Join = "join"

Join is the sub-endpoint for joining a meeting

View Source
const PublishRecordings = "publishRecordings"

PublishRecordings is the sub-endpoint for publishing a recording

View Source
const PutRecordingTextTrack = "putRecordingTextTrack"

PutRecordingTextTrack is the sub-endpoint for putting a text track

View Source
const UpdateRecordings = "updateRecordings"

UpdateRecordings is the sub-endpoint for updating a recording

View Source
const Version = "2.0"

Version is the version of the api

Variables

This section is empty.

Functions

func Path

func Path(action string) string

Path format action as a path

func StringToSHA1

func StringToSHA1(value string) (string, error)

StringToSHA1 returns the string value hashed with SHA1 algorithm

Types

type Attendee

type Attendee struct {
	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"`
}

Attendee represents a Bigbluebutton attendee

type BigBlueButtonInstance

type BigBlueButtonInstance struct {
	URL    string `json:"url"`
	Secret string `json:"secret"`
}

BigBlueButtonInstance represents a REST admin Bigbluebutton instance. It contains the server URL and the server secret.

func (*BigBlueButtonInstance) Create

func (i *BigBlueButtonInstance) Create(params string) (*CreateResponse, error)

Create execute a create api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) DeleteRecordings

func (i *BigBlueButtonInstance) DeleteRecordings(params string) (*DeleteRecordingsResponse, error)

DeleteRecordings perform a delete recordings api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) End

func (i *BigBlueButtonInstance) End(params string) (*EndResponse, error)

End execute a end api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) GetJoinRedirectURL

func (i *BigBlueButtonInstance) GetJoinRedirectURL(params string) (string, error)

GetJoinRedirectURL compute the join redirect url

func (*BigBlueButtonInstance) GetMeetingInfo

func (i *BigBlueButtonInstance) GetMeetingInfo(params string) (*GetMeetingInfoResponse, error)

GetMeetingInfo execute a get meeting info api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) GetMeetings

func (i *BigBlueButtonInstance) GetMeetings() (*GetMeetingsResponse, error)

GetMeetings execute a get meetings api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) GetRecordingTextTracks

func (i *BigBlueButtonInstance) GetRecordingTextTracks(params string) (*GetRecordingsTextTracksResponse, error)

GetRecordingTextTracks perform a get recording text tracks api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) GetRecordings

func (i *BigBlueButtonInstance) GetRecordings(params string) (*GetRecordingsResponse, error)

GetRecordings perform a get recordings api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) IsMeetingRunning

func (i *BigBlueButtonInstance) IsMeetingRunning(params string) (*IsMeetingsRunningResponse, error)

IsMeetingRunning checks if a meeting is running on the remote Bigbluebutton instance

func (*BigBlueButtonInstance) Join

Join execute a join api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) PublishRecordings

func (i *BigBlueButtonInstance) PublishRecordings(params string) (*PublishRecordingsResponse, error)

PublishRecordings perform a publish recordings api call on the remote BigBlueButton instance

func (*BigBlueButtonInstance) Redirect

func (i *BigBlueButtonInstance) Redirect(c *gin.Context, action string, parameters string)

Redirect redirect provided context to instance action

func (*BigBlueButtonInstance) UpdateRecordings

func (i *BigBlueButtonInstance) UpdateRecordings(params string) (*UpdateRecordingsResponse, error)

UpdateRecordings perform a update recordings api call on the remote BigBlueButton instance

type Checksum

type Checksum struct {
	Secret string
	Action string
	Params string
}

Checksum in BigBlueButton authentication system represents an action name, all parameters and a secret concatenated in a single string that is hashed by SHA1.

func CreateChecksum

func CreateChecksum(secret string, action string, params string) *Checksum

CreateChecksum returns a checksum given a secret, action and params

func (*Checksum) Process

func (c *Checksum) Process() (string, error)

Process compute the value and hash the previous value with SHA1 algorithm

func (*Checksum) SetTenantMetadata

func (c *Checksum) SetTenantMetadata(host string)

SetTenantMetadata set metadata tenant for the context

func (*Checksum) Value

func (c *Checksum) Value() string

Value compute the checksum string. It does not hash the value into SHA1 string

type Codes

type Codes struct {
	Success string
	Failed  string
}

Codes represents the api return code

func ReturnCodes

func ReturnCodes() *Codes

ReturnCodes returns a struct containing the api return codes

type CreateResponse

type CreateResponse struct {
	Response
	MeetingID            string `xml:"meetingID"`
	InternalMeetingID    string `xml:"internalMetingID"`
	ParentMeetingID      string `xml:"parentMetingID"`
	AttendeePW           string `xml:"attendePW"`
	ModeratorPW          string `xml:"moderatorPW"`
	CreateTime           string `xml:"createTime"`
	VoiceBridge          string `xml:"voiceBridge"`
	DialNumber           string `xml:"dialNumber"`
	CreateDate           string `xml:"createDate"`
	HasUserJoined        string `xml:"hasUserJoined"`
	Duration             string `xml:"duration"`
	HasBeenForciblyEnded string `xml:"hasBeenForciblyEnded"`
}

CreateResponse represents the Bigbluebutton create API response type

type DeleteRecordingsResponse

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

DeleteRecordingsResponse represents the Bigbluebutton deleteRecordings API response type

type EndResponse

type EndResponse struct {
	Response
}

EndResponse represents the Bigbluebutton end API response type

type Endpoint

type Endpoint struct {
	Method  string
	Path    string
	Handler gin.HandlerFunc
}

Endpoint represent a server endpoint using a http method, a http path and a handler

type EndpointGroup

type EndpointGroup struct {
	Path      string
	Endpoints []interface{}
}

EndpointGroup represent a group of endpoints

func (*EndpointGroup) Load

func (g *EndpointGroup) Load(group *gin.RouterGroup)

Load endpoints from a list of endpoints

type Error

type Error struct {
	Response
}

Error represents the error response

func CreateError

func CreateError(key string, message string) *Error

CreateError returns an error response given a message key and message

func DefaultChecksumError

func DefaultChecksumError() *Error

DefaultChecksumError returns a default checksum error

type GetMeetingInfoResponse

type GetMeetingInfoResponse struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"`
	MeetingInfo
}

GetMeetingInfoResponse represents the Bigbluebutton getMeetingInfo API response type

type GetMeetingsResponse

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

GetMeetingsResponse represents the Bigbluebutton getMeetings API response type

type GetRecordingsResponse

type GetRecordingsResponse struct {
	Response
	Recordings []Recording `xml:"recordings>recording"`
}

GetRecordingsResponse represents the Bigbluebutton getRecordings API response type

type GetRecordingsTextTracksResponse

type GetRecordingsTextTracksResponse struct {
	Response RecordingsTextTrackResponseType `json:"response"`
}

GetRecordingsTextTracksResponse represents the bigbluebutton GetRecordingsTextTracks API response type

type HealthCheck

type HealthCheck struct {
	XMLName    xml.Name `xml:"response"`
	ReturnCode string   `xml:"returncode"`
	Version    string   `xml:"version"`
}

HealthCheck represents the healthcheck response

func CreateHealthCheck

func CreateHealthCheck() *HealthCheck

CreateHealthCheck returns a health check response

type IsMeetingsRunningResponse

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

IsMeetingsRunningResponse represents the Bigbluebutton isMeetingRunning API response type

type JSONResponse

type JSONResponse struct {
	Response Response `json:"response"`
}

JSONResponse represents the basic api response as json

func CreateJSONError

func CreateJSONError(key string, message string) *JSONResponse

CreateJSONError returns an error response given a message key and message

type JoinRedirectResponse

type JoinRedirectResponse struct {
	Response
	MeetingID    string `xml:"meeting_id"`
	UserID       string `xml:"user_id"`
	AuthToken    string `xml:"auth_token"`
	SessionToken string `xml:"session_token"`
	URL          string `xml:"url"`
}

JoinRedirectResponse represents the BigBlueButton join API response type when query parameter `redirect=false` is set

type Keys

type Keys struct {
	ValidationError          string
	DuplicationWarning       string
	NotFound                 string
	SendEndMeetingRequest    string
	NoRecordings             string
	MissingRecordIDParameter string
	ParamError               string
}

Keys represents the api message key

func MessageKeys

func MessageKeys() *Keys

MessageKeys return a struct containing the api message keys

type MeetingInfo

type MeetingInfo struct {
	MeetingName           string     `xml:"meetingName"`
	InternalMeetingID     string     `xml:"internalMeetingID"`
	MeetingID             string     `xml:"meetingID"`
	CreateTime            string     `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"`
	HasUserJoined         string     `xml:"hasUserJoined"`
	Recording             bool       `xml:"recording"`
	HasBeenForciblyEnded  bool       `xml:"hasBeenForciblyEnded"`
	StartTime             int        `xml:"startTime"`
	EndTime               int        `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"`
	Attendees             []Attendee `xml:"attendees>attendee"`
	MetaData              struct {
		Inner []byte `xml:",innerxml"`
	} `xml:"metadata"`
	IsBreakout bool `xml:"isBreakout"`
}

MeetingInfo represents the Bigbluebutton meeting info API object

type MessageValues

type MessageValues struct {
	EmptyMeetingID             string
	EmptyMeetingName           string
	DuplicationWarning         string
	NotFound                   string
	EndMeeting                 string
	InvalidModeratorPW         string
	NoRecordings               string
	MissingRecordIDParameter   string
	RecordingNotFound          string
	RecordingTextTrackNotFound string
	MissingParamRecordID       string
}

MessageValues represents the api messages

func Messages

func Messages() *MessageValues

Messages returns a struct containing the api messages

type PublishRecordingsResponse

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

PublishRecordingsResponse represents the Bigbluebutton publishRecordings API response type

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         int      `xml:"startTime"`
	EndTime           int      `xml:"endTime"`
	Participants      int      `xml:"participants"`
	MetaData          struct {
		Inner []byte `xml:",innerxml"`
	} `xml:"metadata"`
	Playback struct {
		Inner []byte `xml:",innerxml"`
	}
}

Recording represents the BigBlueButton recording API object

type RecordingsTextTrackResponseType

type RecordingsTextTrackResponseType struct {
	ReturnCode string  `json:"returncode"`
	Tracks     []Track `json:"tracks"`
}

RecordingsTextTrackResponseType represents the inner response type for GetRecordingsTextTracks

type Response

type Response struct {
	XMLName    xml.Name `xml:"response" json:"-"`
	ReturnCode string   `xml:"returncode" json:"returncode"`
	MessageKey string   `xml:"messageKey" json:"messageKey"`
	Message    string   `xml:"message" json:"message"`
}

Response represents the basic api response

type Track

type Track struct {
	Href   string `json:"href"`
	Kind   string `json:"kind"`
	Label  string `json:"label"`
	Lang   string `json:"lang"`
	Source string `json:"source"`
}

Track represents a text track for a recording

type UpdateRecordingsResponse

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

UpdateRecordingsResponse represents the Bigbluebutton updateRecordings API response type

Jump to

Keyboard shortcuts

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