zoom

package module
v0.0.0-...-ce85322 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

README

Zoom.us Go Client Library

Go client library for the Zoom.us REST API.

About

Built out of necessity, this repo will only support select endpoints at first. Hopefully, it will eventually support all Zoom API endpoints.

Examples

For example use, see the examples directory

Features
  • VideoSDK
    • List Session
  • MeetingSDK
  • ...

Documentation

Index

Constants

View Source
const (
	SessionStartedEvent = "session.started"
	SessionEndedEvent   = "session.ended"
)

Session

View Source
const CallBackURLValidationEvent = "endpoint.url_validation"

Callback URL Validation Event

Variables

This section is empty.

Functions

func DefaultHTTPClient

func DefaultHTTPClient() *http.Client

func HMAC256

func HMAC256(text, salt string) (string, error)

Types

type API

type API interface {
	Authentication
	Video
}

type Authentication

type Authentication interface {
	GrantVideoToken(ctx context.Context, req GrantVideoTokenRequest) (Token, error)
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts ...ClientOpt) (*Client, error)

func (*Client) GrantVideoToken

func (c *Client) GrantVideoToken(ctx context.Context, req GrantVideoTokenRequest) (Token, error)

type ClientOpt

type ClientOpt func(c *Client) *Client

func WithHTTPClient

func WithHTTPClient(conn *http.Client) ClientOpt

type GrantVideoTokenRequest

type GrantVideoTokenRequest struct {
	RoleType               RoleType
	TPC                    string
	ExpiresIn              time.Duration
	UserIdentity           *string
	SessionKey             *string
	GeoRegions             *string
	CloudRecordingOption   *int
	CloudRecordingElection *int
	TelemetryTrackingID    *string
}

type RoleType

type RoleType int
const (
	RoleTypeParticipant RoleType = 0
	RoleTypeHost        RoleType = 1
)

type SessionEndedPayload

type SessionEndedPayload struct {
	AccountID string                    `json:"account_id"`
	Object    SessionEndedPayloadObject `json:"object"`
}

type SessionEndedPayloadObject

type SessionEndedPayloadObject struct {
	ID          string    `json:"id"`
	SessionID   string    `json:"session_id"`
	SessionName string    `json:"session_name"`
	SessionKey  string    `json:"session_key"`
	StartTime   time.Time `json:"start_time"`
	EndTime     time.Time `json:"end_time"`
}

type SessionStartedPayload

type SessionStartedPayload struct {
	AccountID string                      `json:"account_id"`
	Object    SessionStartedPayloadObject `json:"object"`
}

type SessionStartedPayloadObject

type SessionStartedPayloadObject struct {
	ID          string    `json:"id"`
	SessionID   string    `json:"session_id"`
	SessionName string    `json:"session_name"`
	SessionKey  string    `json:"session_key"`
	StartTime   time.Time `json:"start_time"`
}

type Token

type Token struct {
	AccessToken string
	ExpiresIn   time.Duration
}

type URLCallbackChallengePayload

type URLCallbackChallengePayload struct {
	PlainToken string `json:"plainToken"`
}

type URLCallbackChallengeResponse

type URLCallbackChallengeResponse struct {
	PlainToken     string `json:"plainToken"`
	EncryptedToken string `json:"encryptedToken"`
}

func Challenger

func Challenger(payload json.RawMessage, webhookSecretToken string) (URLCallbackChallengeResponse, error)

type Video

type Video interface {
}

type VideoClaims

type VideoClaims struct {
	AppKey                 string       `json:"app_key"`
	RoleType               RoleType     `json:"role_type"`
	TPC                    string       `json:"tpc"`
	Version                VideoVersion `json:"version"`
	UserIdentity           *string      `json:"user_identity,omitempty"`
	SessionKey             *string      `json:"session_key,omitempty"`
	GeoRegions             *string      `json:"geo_regions,omitempty"`
	CloudRecordingOption   *int         `json:"cloud_recording_option,omitempty"`
	CloudRecordingElection *int         `json:"cloud_recording_election,omitempty"`
	TelemetryTrackingID    *string      `json:"telemetry_tracking_id,omitempty"`

	jwt.RegisteredClaims
}

VideoClaims references: https://developers.zoom.us/docs/video-sdk/auth/#generate-a-video-sdk-jwt

type VideoVersion

type VideoVersion int
const (
	VideoVersion1 VideoVersion = 1
)

type WebhookCallBackRequest

type WebhookCallBackRequest struct {
	Payload json.RawMessage `json:"payload"`
	Event   string          `json:"event"`
	EventTs int64           `json:"event_ts"`
}

func CallBackRequest

func CallBackRequest(r *http.Request) (WebhookCallBackRequest, error)

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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