Documentation ¶
Index ¶
- Constants
- type AuthError
- type Client
- type ComplianceRequest
- type CreateMeetingRequest
- type DeauthorizationEvent
- type DeauthorizationPayload
- type EventType
- type Meeting
- type MeetingType
- type MeetingWebhook
- type MeetingWebhookObject
- type MeetingWebhookPayload
- type OAuthClient
- type OAuthUserInfo
- type PluginAPI
- type RecordingWebhook
- type RecordingWebhookContent
- type User
- type ValidationWebhook
- type ValidationWebhookPayload
- type ValidationWebhookResponse
- type Webhook
Constants ¶
const ( WebhookStatusStarted = "STARTED" WebhookStatusEnded = "ENDED" RecordingWebhookTypeComplete = "RECORDING_MEETING_COMPLETED" RecentlyCreated = "RECENTLY_CREATED" EventTypeMeetingStarted EventType = "meeting.started" EventTypeMeetingEnded EventType = "meeting.ended" EventTypeValidateWebhook EventType = "endpoint.url_validation" )
const (
// OAuthPrompt stores the template to show the users to connect to Zoom
OAuthPrompt = "[Click here to link your Zoom account.](%s/plugins/zoom/oauth2/connect)"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetMeeting(meetingID int) (*Meeting, error) GetUser(user *model.User, firstConnect bool) (*User, *AuthError) CreateMeeting(user *User, topic string) (*Meeting, error) }
Client interface for Zoom
type ComplianceRequest ¶ added in v1.5.0
type CreateMeetingRequest ¶ added in v1.7.0
type CreateMeetingRequest struct { Topic string `json:"topic"` Type MeetingType `json:"type"` StartTime string `json:"start_time,omitempty"` Duration int `json:"duration,omitempty"` ScheduleFor string `json:"schedule_for,omitempty"` Timezone string `json:"timezone,omitempty"` Password string `json:"password"` Agenda string `json:"agenda"` TrackingFields []struct { Field string `json:"field"` Value string `json:"value"` } `json:"tracking_fields"` Recurrence *struct { Type int `json:"type"` RepeatInterval int `json:"repeat_interval"` WeeklyDays string `json:"weekly_days,omitempty"` MonthlyDay int `json:"monthly_day,omitempty"` MonthlyWeekDay int `json:"monthly_week_day,omitempty"` EndTimes int `json:"end_times,omitempty"` EndDateTime int `json:"end_date_time,omitempty"` } `json:"recurrence,omitempty"` Settings struct { HostVideo bool `json:"host_video"` ParticipantVideo bool `json:"participant_video"` CNMeeting bool `json:"cn_meeting"` INMeeting bool `json:"in_meeting"` JoinBeforeHost bool `json:"join_before_host"` MuteUponEntry bool `json:"mute_upon_entry"` Watermark bool `json:"watermark"` UsePMI bool `json:"use_pmi"` ApprovalType int `json:"approval_type"` RegistrationType int `json:"registration_type"` Audio string `json:"audio"` AutoRecording string `json:"auto_recording"` AlternativeHosts string `json:"alternative_hosts"` WaitingRoom bool `json:"waiting_room"` GlobalDialInCountries []string `json:"global_dial_in_countries"` GlobalDialInNumbers []struct { Country string `json:"country"` CountryName string `json:"country_name"` City string `json:"city"` Number string `json:"number"` Type string `json:"type"` } `json:"global_dial_in_numbers"` ContactName string `json:"contact_name"` ContactEmail string `json:"contact_email"` RegistrantsConfirmationEmail bool `json:"registrants_confirmation_email"` RegistrantsEmailNotification bool `json:"registrants_email_notification"` MeetingAuthentication bool `json:"meeting_authentication"` AuthenticationOption string `json:"authentication_option"` AuthenticationDomains string `json:"authentication_domains"` AuthenticationName string `json:"authentication_name"` } `json:"settings,omitempty"` }
CreateMeetingRequest as defined at https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
type DeauthorizationEvent ¶ added in v1.4.0
type DeauthorizationEvent struct {}
type DeauthorizationPayload ¶ added in v1.4.0
type DeauthorizationPayload struct {}
type Meeting ¶
type Meeting struct { UUID string `json:"uuid"` ID int `json:"id"` HostID string `json:"host_id"` Topic string `json:"topic"` Type MeetingType `json:"type"` Status string `json:"status"` StartTime string `json:"start_time"` Duration int `json:"duration"` Timezone string `json:"timezone"` CreatedAt string `json:"created_at"` Agenda string `json:"agenda"` JoinURL string `json:"join_url"` StartURL string `json:"start_url"` Password string `json:"password"` H323Password string `json:"h323_password"` EncryptedPassword string `json:"encrypted_password"` PMI int `json:"pmi"` TrackingFields []struct { Field string `json:"field"` Value string `json:"value"` } `json:"tracking_fields"` Occurrences []struct { OccurrenceID string `json:"occurrence_id"` StartTime string `json:"start_time"` Duration int `json:"duration"` Status string `json:"status"` } `json:"occurrences"` Settings struct { HostVideo bool `json:"host_video"` ParticipantVideo bool `json:"participant_video"` CNMeeting bool `json:"cn_meeting"` INMeeting bool `json:"in_meeting"` JoinBeforeHost bool `json:"join_before_host"` MuteUponEntry bool `json:"mute_upon_entry"` Watermark bool `json:"watermark"` UsePMI bool `json:"use_pmi"` ApprovalType int `json:"approval_type"` RegistrationType int `json:"registration_type"` Audio string `json:"audio"` AutoRecording string `json:"auto_recording"` AlternativeHosts string `json:"alternative_hosts"` WaitingRoom bool `json:"waiting_room"` GlobalDialInCountries []string `json:"global_dial_in_countries"` GlobalDialInNumbers []struct { Country string `json:"country"` CountryName string `json:"country_name"` City string `json:"city"` Number string `json:"number"` Type string `json:"type"` } `json:"global_dial_in_numbers"` ContactName string `json:"contact_name"` ContactEmail string `json:"contact_email"` RegistrantsConfirmationEmail bool `json:"registrants_confirmation_email"` RegistrantsEmailNotification bool `json:"registrants_email_notification"` MeetingAuthentication bool `json:"meeting_authentication"` AuthenticationOption string `json:"authentication_option"` AuthenticationDomains string `json:"authentication_domains"` AuthenticationName string `json:"authentication_name"` } `json:"settings"` }
Meeting is defined at https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meeting
type MeetingType ¶ added in v1.7.0
type MeetingType int
MeetingType as defined at https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
const ( // MeetingTypeInstant meeting MeetingTypeInstant MeetingType = 1 // MeetingTypeScheduled meeting MeetingTypeScheduled MeetingType = 2 // MeetingTypeRecurringWithNoFixedTime meeting MeetingTypeRecurringWithNoFixedTime MeetingType = 3 // MeetingTypeRecurringWithFixedTime meeting MeetingTypeRecurringWithFixedTime MeetingType = 8 )
type MeetingWebhook ¶ added in v1.4.0
type MeetingWebhook struct { Event EventType `json:"event"` Payload MeetingWebhookPayload `json:"payload"` }
type MeetingWebhookObject ¶ added in v1.4.0
type MeetingWebhookObject struct { Duration int `json:"duration"` StartTime time.Time `json:"start_time"` Timezone string `json:"timezone"` EndTime time.Time `json:"end_time"` Topic string `json:"topic"` ID string `json:"id"` Type int `json:"type"` UUID string `json:"uuid"` HostID string `json:"host_id"` }
type MeetingWebhookPayload ¶ added in v1.4.0
type MeetingWebhookPayload struct { AccountID string `json:"account_id"` Object MeetingWebhookObject `json:"object"` }
type OAuthClient ¶ added in v1.5.0
type OAuthClient struct {
// contains filtered or unexported fields
}
OAuthClient represents an OAuth-based Zoom client.
func (*OAuthClient) CreateMeeting ¶ added in v1.7.0
func (c *OAuthClient) CreateMeeting(user *User, topic string) (*Meeting, error)
CreateMeeting creates a new meeting for the user and returns the created meeting.
func (*OAuthClient) GetMeeting ¶ added in v1.5.0
func (c *OAuthClient) GetMeeting(meetingID int) (*Meeting, error)
GetMeeting returns the Zoom meeting with the given ID via OAuth.
type OAuthUserInfo ¶ added in v1.5.0
type OAuthUserInfo struct { ZoomEmail string OAuthToken *oauth2.Token // Zoom OAuth Token, ttl 15 years UserID string // Mattermost userID ZoomID string // Zoom userID }
OAuthUserInfo represents a Zoom user authenticated via OAuth.
type RecordingWebhook ¶
type RecordingWebhookContent ¶
type RecordingWebhookContent struct { UUID string `json:"uuid"` MeetingNumber int `json:"meeting_number"` AccountID string `json:"account_id"` HostID string `json:"host_id"` Topic string `json:"topic"` StartTime time.Time `json:"start_time"` Timezone string `json:"timezone"` HostEmail string `json:"host_email"` Duration int `json:"duration"` TotalSize int `json:"total_size"` RecordingCount int `json:"recording_count"` RecordingFiles []struct { ID string `json:"id"` MeetingID string `json:"meeting_id"` RecordingStart time.Time `json:"recording_start"` RecordingEnd time.Time `json:"recording_end"` FileType string `json:"file_type"` FileSize int `json:"file_size"` FilePath string `json:"file_path"` Status string `json:"status"` } `json:"recording_files"` }
type User ¶
type User struct { ID string `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` Type int `json:"type"` Pmi int `json:"pmi"` Timezone string `json:"timezone"` Dept string `json:"dept"` CreatedAt time.Time `json:"created_at"` LastLoginTime time.Time `json:"last_login_time"` LastClientVersion string `json:"last_client_version"` VanityURL string `json:"vanity_url"` Verified int `json:"verified"` PicURL string `json:"pic_url"` }
User is defined at https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users
type ValidationWebhook ¶ added in v1.6.2
type ValidationWebhook struct { Event EventType `json:"event"` Payload ValidationWebhookPayload `json:"payload"` }
type ValidationWebhookPayload ¶ added in v1.6.2
type ValidationWebhookPayload struct {
PlainToken string `json:"plainToken"`
}