zoom

package
v0.0.0-...-62b1a13 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MeetingSDKJWT

func MeetingSDKJWT(meetingSDKKey, meetingSDKSecret string, meetingNumber int64, role int, expiration time.Duration) (string, error)

MeetingSDKJWT creates a Meeting SDK JWT, signs it, and returns the signed string (see https://marketplace.zoom.us/docs/sdk/native-sdks/auth/#meeting-sdk-auth). role is required for web, optional for native. 0 to specify participant or 1 to specify host. expiration is the duration or expiration of JWT from now. Minimum duration is 1800 seconds, maximum duration is 48 hours. Default duration is 24 hours.

func Ptr

func Ptr[T any](val T) *T

Types

type Client

type Client struct {
	Users    *UsersService
	Meetings *MeetingsService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient *http.Client, accountID, clientID, clientSecret string, tokenMutex TokenMutex) *Client

NewClient assumes the usage of Server-to-Server OAuth app https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/

type ErrorResponse

type ErrorResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Errors  []FieldError
}

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type FieldError

type FieldError struct {
	Field   string `json:"field"`
	Message string `json:"message"`
}

type MeetingCreateResponseSettings

type MeetingCreateResponseSettings struct {
	AllowMultipleDevices               bool                                                              `json:"allow_multiple_devices,omitempty"`
	AlternativeHosts                   string                                                            `json:"alternative_hosts,omitempty"`
	AlternativeHostsEmailNotification  bool                                                              `json:"alternative_hosts_email_notification,omitempty"`
	AlternativeHostUpdatePolls         bool                                                              `json:"alternative_host_update_polls,omitempty"`
	ApprovalType                       int                                                               `json:"approval_type,omitempty"`
	ApprovedOrDeniedCountriesOrRegions *MeetingsCreateResponseSettingsApprovedOrDeniedCountriesOrRegions `json:"approved_or_denied_countries_or_regions,omitempty"`
	Audio                              string                                                            `json:"audio,omitempty"`
	AuthenticationDomains              string                                                            `json:"authentication_domains,omitempty"`
	AuthenticationException            []*MeetingsCreateResponseSettingsAuthenticationException          `json:"authentication_exception,omitempty"`
	AuthenticationName                 string                                                            `json:"authentication_name,omitempty"`
	AuthenticationOption               string                                                            `json:"authentication_option,omitempty"`
	AutoRecording                      string                                                            `json:"auto_recording,omitempty"`
	BreakoutRoom                       *MeetingsCreateResponseSettingsBreakoutRoom                       `json:"breakout_room,omitempty"`
	CalendarType                       int                                                               `json:"calendar_type,omitempty"`
	CloseRegistration                  bool                                                              `json:"close_registration,omitempty"`
	ContactEmail                       string                                                            `json:"contact_email,omitempty"`
	ContactName                        string                                                            `json:"contact_name,omitempty"`
	CustomKeys                         []*MeetingsCreateResponseSettingsCustomKey                        `json:"custom_keys,omitempty"`
	EmailNotification                  bool                                                              `json:"email_notification,omitempty"`
	EncryptionType                     string                                                            `json:"encryption_type,omitempty"`
	FocusMode                          bool                                                              `json:"focus_mode,omitempty"`
	GlobalDialInCountries              []string                                                          `json:"global_dial_in_countries,omitempty"`
	GlobalDialInNumbers                []*MeetingsCreateResponseSettingsGlobalDialInNumber               `json:"global_dial_in_numbers,omitempty"`
	HostSaveVideoOrder                 bool                                                              `json:"host_save_video_order,omitempty"`
	HostVideo                          bool                                                              `json:"host_video,omitempty"`
	JbhTime                            int                                                               `json:"jbh_time,omitempty"`
	JoinBeforeHost                     bool                                                              `json:"join_before_host,omitempty"`
	LanguageInterpretation             *MeetingsCreateResponseSettingsLanguageInterpretation             `json:"language_interpretation,omitempty"`
	MeetingAuthentication              bool                                                              `json:"meeting_authentication,omitempty"`
	MuteUponEntry                      bool                                                              `json:"mute_upon_entry,omitempty"`
	ParticipantVideo                   bool                                                              `json:"participant_video,omitempty"`
	PrivateMeeting                     bool                                                              `json:"private_meeting,omitempty"`
	RegistrantsConfirmationEmail       bool                                                              `json:"registrants_confirmation_email,omitempty"`
	RegistrantsEmailNotification       bool                                                              `json:"registrants_email_notification,omitempty"`
	RegistrationType                   int                                                               `json:"registration_type,omitempty"`
	ShowShareButton                    bool                                                              `json:"show_share_button,omitempty"`
	UsePmi                             bool                                                              `json:"use_pmi,omitempty"`
	WaitingRoom                        bool                                                              `json:"waiting_room,omitempty"`
	Watermark                          bool                                                              `json:"watermark,omitempty"`
}

type MeetingsCreateOptions

type MeetingsCreateOptions struct {
	DefaultPassword *bool                           `json:"default_password,omitempty"`
	Duration        *int                            `json:"duration,omitempty"`
	Settings        *MeetingsCreateOptionsSettings  `json:"settings,omitempty"`
	StartTime       *MeetingsCreateOptionsStartTime `json:"start_time,omitempty"`
	Type            *int                            `json:"type,omitempty"`
}

type MeetingsCreateOptionsSettings

type MeetingsCreateOptionsSettings struct {
	JBHTime        *int  `json:"jbh_time,omitempty"`
	JoinBeforeHost *bool `json:"join_before_host,omitempty"`
}

type MeetingsCreateOptionsStartTime

type MeetingsCreateOptionsStartTime time.Time

func (MeetingsCreateOptionsStartTime) MarshalJSON

func (m MeetingsCreateOptionsStartTime) MarshalJSON() ([]byte, error)

type MeetingsCreateResponse

type MeetingsCreateResponse struct {
	Agenda          string                                 `json:"agenda"`
	AssistantID     string                                 `json:"assistant_id"`
	CreatedAt       time.Time                              `json:"created_at"`
	Duration        int                                    `json:"duration"`
	H323Password    string                                 `json:"h323_password"`
	HostEmail       string                                 `json:"host_email"`
	ID              int64                                  `json:"id"`
	JoinURL         string                                 `json:"join_url"`
	Occurrences     *MeetingsCreateResponseOccurences      `json:"occurrences"`
	Password        string                                 `json:"password"`
	Pmi             string                                 `json:"pmi"`
	PreSchedule     bool                                   `json:"pre_schedule"`
	Recurrence      *MeetingsCreateResponseRecurrence      `json:"recurrence"`
	RegistrationURL string                                 `json:"registration_url"`
	Settings        *MeetingCreateResponseSettings         `json:"settings"`
	StartTime       time.Time                              `json:"start_time"`
	StartURL        string                                 `json:"start_url"`
	Timezone        string                                 `json:"timezone"`
	Topic           string                                 `json:"topic"`
	TrackingFields  []*MeetingsCreateResponseTrackingField `json:"tracking_fields"`
	Type            int                                    `json:"type"`
}

type MeetingsCreateResponseOccurences

type MeetingsCreateResponseOccurences struct {
	Duration     int       `json:"duration,omitempty"`
	OccurrenceID string    `json:"occurrence_id,omitempty"`
	StartTime    time.Time `json:"start_time,omitempty"`
	Status       string    `json:"status,omitempty"`
}

type MeetingsCreateResponseRecurrence

type MeetingsCreateResponseRecurrence struct {
	EndDateTime    time.Time `json:"end_date_time,omitempty"`
	EndTimes       int       `json:"end_times,omitempty"`
	MonthlyDay     int       `json:"monthly_day,omitempty"`
	MonthlyWeek    int       `json:"monthly_week,omitempty"`
	MonthlyWeekDay int       `json:"monthly_week_day,omitempty"`
	RepeatInterval int       `json:"repeat_interval,omitempty"`
	Type           int       `json:"type"`
	WeeklyDays     string    `json:"weekly_days,omitempty"`
}

type MeetingsCreateResponseSettingsApprovedOrDeniedCountriesOrRegions

type MeetingsCreateResponseSettingsApprovedOrDeniedCountriesOrRegions struct {
	ApprovedList []string `json:"approved_list,omitempty"`
	DeniedList   []string `json:"denied_list,omitempty"`
	Enable       bool     `json:"enable,omitempty"`
	Method       string   `json:"method,omitempty"`
}

type MeetingsCreateResponseSettingsAuthenticationException

type MeetingsCreateResponseSettingsAuthenticationException struct {
	Email   string `json:"email,omitempty"`
	JoinURL string `json:"join_url,omitempty"`
	Name    string `json:"name,omitempty"`
}

type MeetingsCreateResponseSettingsBreakoutRoom

type MeetingsCreateResponseSettingsBreakoutRoom struct {
	Enable bool                                              `json:"enable,omitempty"`
	Rooms  []*MeetingsCreateResponseSettingsBreakoutRoomRoom `json:"rooms,omitempty"`
}

type MeetingsCreateResponseSettingsBreakoutRoomRoom

type MeetingsCreateResponseSettingsBreakoutRoomRoom struct {
	Name         string   `json:"name,omitempty"`
	Participants []string `json:"participants,omitempty"`
}

type MeetingsCreateResponseSettingsCustomKey

type MeetingsCreateResponseSettingsCustomKey struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type MeetingsCreateResponseSettingsGlobalDialInNumber

type MeetingsCreateResponseSettingsGlobalDialInNumber struct {
	City        string `json:"city,omitempty"`
	Country     string `json:"country,omitempty"`
	CountryName string `json:"country_name,omitempty"`
	Number      string `json:"number,omitempty"`
	Type        string `json:"type,omitempty"`
}

type MeetingsCreateResponseSettingsLanguageInterpretation

type MeetingsCreateResponseSettingsLanguageInterpretation struct {
	Enable       bool                                                               `json:"enable,omitempty"`
	Interpreters []*MeetingsCreateResponseSettingsLanguageInterpretationInterpreter `json:"interpreters,omitempty"`
}

type MeetingsCreateResponseSettingsLanguageInterpretationInterpreter

type MeetingsCreateResponseSettingsLanguageInterpretationInterpreter struct {
	Email     string `json:"email,omitempty"`
	Languages string `json:"languages,omitempty"`
}

type MeetingsCreateResponseTrackingField

type MeetingsCreateResponseTrackingField struct {
	Field   string `json:"field"`
	Value   string `json:"value,omitempty"`
	Visible bool   `json:"visible,omitempty"`
}

type MeetingsDeleteOptions

type MeetingsDeleteOptions struct {
	OccurrenceID          *string `url:"occurrence_id,omitempty"`
	ScheduleForReminder   *bool   `url:"schedule_for_reminder,omitempty"`
	CancelMeetingReminder *bool   `url:"cancel_meeting_reminder,omitempty"`
}

type MeetingsListItem

type MeetingsListItem struct {
	Agenda    string    `json:"agenda"`
	CreatedAt time.Time `json:"created_at"`
	Duration  int       `json:"duration"`
	HostID    string    `json:"host_id"`
	ID        int64     `json:"id"`
	JoinURL   string    `json:"join_url"`
	Pmi       string    `json:"pmi"`
	StartTime time.Time `json:"start_time"`
	Timezone  string    `json:"timezone"`
	Topic     string    `json:"topic"`
	Type      int       `json:"type"`
	UUID      string    `json:"uuid"`
}

type MeetingsListOptions

type MeetingsListOptions struct {
	*PaginationOptions `url:",omitempty"`

	Type *string `url:"type,omitempty"`
}

type MeetingsListResponse

type MeetingsListResponse struct {
	*PaginationResponse

	Meetings []*MeetingsListItem `json:"meetings"`
}

type MeetingsServicer

type MeetingsServicer interface {
	List(ctx context.Context, userID string, opts *MeetingsListOptions) (*MeetingsListResponse, *http.Response, error)
	Create(ctx context.Context, userID string, opts *MeetingsCreateOptions) (*MeetingsCreateResponse, *http.Response, error)
	Delete(ctx context.Context, meetingID int64, opts *MeetingsDeleteOptions) (*http.Response, error)
}

type PaginationOptions

type PaginationOptions struct {
	NextPageToken *string `url:"next_page_token,omitempty"`
	PageSize      *int    `url:"page_size,omitempty"`
}

type PaginationResponse

type PaginationResponse struct {
	NextPageToken string `json:"next_page_token"`
	PageCount     int    `json:"page_count"`
	PageSize      int    `json:"page_size"`
	TotalRecords  int    `json:"total_records"`
}

type TokenMutex

type TokenMutex interface {
	Lock(context.Context) error
	Unlock(context.Context) error
	Get(context.Context) (string, error)
	Set(context.Context, string, time.Time) error
	Clear(context.Context) error
}

type UsersCreateOptions

type UsersCreateOptions struct {
	Action   string                      `json:"action"`
	UserInfo *UsersCreateOptionsUserInfo `json:"user_info"`
}

type UsersCreateOptionsUserInfo

type UsersCreateOptionsUserInfo struct {
	DisplayName *string `json:"display_name,omitempty"`
	Email       string  `json:"email"`
	FirstName   *string `json:"first_name,omitempty"`
	LastName    *string `json:"last_name,omitempty"`
	Password    *string `json:"password,omitempty"`
	Type        int     `json:"type"`
}

type UsersCreateResponse

type UsersCreateResponse struct {
	Email     string `json:"email"`
	FirstName string `json:"first_name"`
	ID        string `json:"id"`
	LastName  string `json:"last_name"`
	Type      int    `json:"type"`
}

type UsersDeleteOptions

type UsersDeleteOptions struct {
	Action *string `url:"action,omitempty"`
}

type UsersListItem

type UsersListItem struct {
	CustomAttributes  []*UsersListItemCustomAttribute `json:"custom_attributes"`
	Dept              string                          `json:"dept"`
	DisplayName       string                          `json:"display_name"`
	Email             string                          `json:"email"`
	EmployeeUniqueID  string                          `json:"employee_unique_id"`
	FirstName         string                          `json:"first_name"`
	GroupIDs          []string                        `json:"group_ids"`
	ID                string                          `json:"id"`
	ImGroupIDs        []string                        `json:"im_group_ids"`
	LastClientVersion string                          `json:"last_client_version"`
	LastLoginTime     time.Time                       `json:"last_login_time"`
	LastName          string                          `json:"last_name"`
	PlanUnitedType    string                          `json:"plan_united_type"`
	Pmi               int64                           `json:"pmi"`
	RoleID            string                          `json:"role_id"`
	Status            string                          `json:"status"`
	Timezone          string                          `json:"timezone"`
	Type              int                             `json:"type"`
	UserCreatedAt     time.Time                       `json:"user_created_at"`
	Verified          int                             `json:"verified"`
}

type UsersListItemCustomAttribute

type UsersListItemCustomAttribute struct {
	Key   string `json:"key"`
	Name  string `json:"name"`
	Value string `json:"value"`
}

type UsersListOptions

type UsersListOptions struct {
	*PaginationOptions `url:",omitempty"`

	IncludeFields *string `url:"include_fields,omitempty"`
	RoleID        *string `url:"role_id,omitempty"`
	Status        *string `url:"status,omitempty"`
}

type UsersListResponse

type UsersListResponse struct {
	*PaginationResponse

	Users []*UsersListItem `json:"users"`
}

type UsersServicer

type UsersServicer interface {
	List(ctx context.Context, opts *UsersListOptions) (*UsersListResponse, *http.Response, error)
	Create(ctx context.Context, opts *UsersCreateOptions) (*UsersCreateResponse, *http.Response, error)
	Delete(ctx context.Context, userID string, opts *UsersDeleteOptions) (*http.Response, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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