zoombot

package
v0.0.0-...-3abce5f Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: BSD-3-Clause, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentifierFromMsg

func IdentifierFromMsg(msg chat1.MsgSummary) string

Types

type CreateMeetingRequest

type CreateMeetingRequest struct {
	Topic     string      `json:"topic,omitempty"`
	Type      MeetingType `json:"type,omitempty"`
	StartTime string      `json:"start_time,omitempty"`
	Duration  int         `json:"duration,omitempty"`
	Timezone  string      `json:"timezone,omitempty"`
	Password  string      `json:"password,omitempty"`
	Agenda    string      `json:"agenda,omitempty"`

	TrackingFields []TrackingField               `json:"tracking_fields,omitempty"`
	Recurrence     *Recurrence                   `json:"recurrence,omitempty"`
	Settings       *CreateMeetingRequestSettings `json:"settings,omitempty"`
}

type CreateMeetingRequestSettings

type CreateMeetingRequestSettings struct {
	HostVideo                    bool     `json:"host_video,omitempty"`
	ParticipantVideo             bool     `json:"participant_video,omitempty"`
	CnMeeting                    bool     `json:"cn_meeting,omitempty"`
	InMeeting                    bool     `json:"in_meeting,omitempty"`
	JoinBeforeHost               bool     `json:"join_before_host,omitempty"`
	MuteUponEntry                bool     `json:"mute_upon_entry,omitempty"`
	Watermark                    bool     `json:"watermark,omitempty"`
	UsePmi                       bool     `json:"use_pmi,omitempty"`
	ApprovalType                 int      `json:"approval_type,omitempty"`
	RegistrationType             int      `json:"registration_type,omitempty"`
	Audio                        string   `json:"audio,omitempty"`
	AutoRecording                string   `json:"auto_recording,omitempty"`
	EnforceLogin                 bool     `json:"enforce_login,omitempty"`
	EnforceLoginDomains          string   `json:"enforce_login_domains,omitempty"`
	AlternativeHosts             string   `json:"alternative_hosts,omitempty"`
	GlobalDialInCountries        []string `json:"global_dial_in_countries,omitempty"`
	RegistrantsEmailNotification bool     `json:"registrants_email_notification,omitempty"`
}

type CreateMeetingResponse

type CreateMeetingResponse struct {
	CreatedAt time.Time   `json:"created_at"`
	Duration  int         `json:"duration"`
	HostID    string      `json:"host_id"`
	ID        int         `json:"id"`
	JoinURL   string      `json:"join_url"`
	StartTime time.Time   `json:"start_time"`
	StartURL  string      `json:"start_url"`
	Status    string      `json:"status"`
	Timezone  string      `json:"timezone"`
	Topic     string      `json:"topic"`
	Type      MeetingType `json:"type"`
	UUID      string      `json:"uuid"`

	Settings CreateMeetingResponseSettings `json:"settings"`
}

func CreateMeeting

func CreateMeeting(client *http.Client, userID string, request *CreateMeetingRequest) (*CreateMeetingResponse, error)

type CreateMeetingResponseSettings

type CreateMeetingResponseSettings struct {
	AlternativeHosts             string                `json:"alternative_hosts"`
	ApprovalType                 int                   `json:"approval_type"`
	Audio                        string                `json:"audio"`
	AutoRecording                string                `json:"auto_recording"`
	CloseRegistration            bool                  `json:"close_registration"`
	CnMeeting                    bool                  `json:"cn_meeting"`
	EnforceLogin                 bool                  `json:"enforce_login"`
	EnforceLoginDomains          string                `json:"enforce_login_domains"`
	GlobalDialInCountries        []string              `json:"global_dial_in_countries"`
	GlobalDialInNumbers          []GlobalDialInNumbers `json:"global_dial_in_numbers"`
	HostVideo                    bool                  `json:"host_video"`
	InMeeting                    bool                  `json:"in_meeting"`
	JoinBeforeHost               bool                  `json:"join_before_host"`
	MuteUponEntry                bool                  `json:"mute_upon_entry"`
	ParticipantVideo             bool                  `json:"participant_video"`
	RegistrantsConfirmationEmail bool                  `json:"registrants_confirmation_email"`
	UsePmi                       bool                  `json:"use_pmi"`
	WaitingRoom                  bool                  `json:"waiting_room"`
	Watermark                    bool                  `json:"watermark"`
	RegistrantsEmailNotification bool                  `json:"registrants_email_notification"`
}

type Credentials

type Credentials struct {
	ClientID          string `json:"client_id"`
	ClientSecret      string `json:"client_secret"`
	VerificationToken string `json:"verification_token"`
}

type DB

type DB struct {
	*base.OAuthDB
}

func NewDB

func NewDB(db *sql.DB) *DB

func (*DB) CreateUser

func (d *DB) CreateUser(userID, accountID, identifier string) error

func (*DB) DeleteUserAndToken

func (d *DB) DeleteUserAndToken(userID, accountID string) error

type DataComplianceRequest

type DataComplianceRequest struct {
	ClientID                     string               `json:"client_id"`
	UserID                       string               `json:"user_id"`
	AccountID                    string               `json:"account_id"`
	DeauthorizationEventReceived DeauthorizationEvent `json:"deauthorization_event_received"`
	ComplianceCompleted          bool                 `json:"compliance_completed"`
}

type DataComplianceResponse

type DataComplianceResponse struct {
	UserDataRetention   bool   `json:"user_data_retention"`
	AccountID           string `json:"account_id"`
	UserID              string `json:"user_id"`
	Signature           string `json:"signature"`
	DeauthorizationTime string `json:"deauthorization_time"`
	ClientID            string `json:"client_id"`
}

func DataCompliance

func DataCompliance(clientID, clientSecret string, request *DataComplianceRequest) (*DataComplianceResponse, error)

type DeauthorizationEvent

type DeauthorizationEvent struct {
	UserDataRetention   string `json:"user_data_retention"`
	AccountID           string `json:"account_id"`
	UserID              string `json:"user_id"`
	Signature           string `json:"signature"`
	DeauthorizationTime string `json:"deauthorization_time"`
	ClientID            string `json:"client_id"`
}

type DeauthorizationRequest

type DeauthorizationRequest struct {
	Event   string               `json:"event"`
	Payload DeauthorizationEvent `json:"payload"`
}

type GetUserResponse

type GetUserResponse struct {
	ID        string `json:"id"`
	AccountID string `json:"account_id"`
}

intentionally leave out unnecessary user data

func GetUser

func GetUser(client *http.Client, userID string) (*GetUserResponse, error)

type GlobalDialInNumbers

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

type HTTPSrv

type HTTPSrv struct {
	*base.OAuthHTTPSrv
	// contains filtered or unexported fields
}

func NewHTTPSrv

func NewHTTPSrv(stats *base.StatsRegistry, kbc *kbchat.API, debugConfig *base.ChatDebugOutputConfig,
	db *DB, handler *Handler, oauthConfig *oauth2.Config, credentials *Credentials) *HTTPSrv

type Handler

type Handler struct {
	*base.DebugOutput
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(stats *base.StatsRegistry, kbc *kbchat.API, debugConfig *base.ChatDebugOutputConfig,
	db *DB, config *oauth2.Config) *Handler

func (*Handler) HandleAuth

func (h *Handler) HandleAuth(msg chat1.MsgSummary, identifier string) error

func (*Handler) HandleCommand

func (h *Handler) HandleCommand(msg chat1.MsgSummary) error

func (*Handler) HandleNewConv

func (h *Handler) HandleNewConv(conv chat1.ConvSummary) error

type MeetingType

type MeetingType int
const (
	InstantMeeting              MeetingType = 1
	ScheduledMeeting            MeetingType = 2
	RecurringMeetingNoFixedTime MeetingType = 3
	RecurringMeetingFixedTime   MeetingType = 8
)

type Recurrence

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

type TrackingField

type TrackingField struct {
	Field string `json:"field,omitempty"`
	Value string `json:"value,omitempty"`
}

type ZoomAPIError

type ZoomAPIError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (ZoomAPIError) Error

func (e ZoomAPIError) Error() string

Jump to

Keyboard shortcuts

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