webhook

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 14 Imported by: 7

Documentation

Index

Constants

View Source
const (
	EventRoomStarted       = "room_started"
	EventRoomFinished      = "room_finished"
	EventParticipantJoined = "participant_joined"
	EventParticipantLeft   = "participant_left"
	EventTrackPublished    = "track_published"
	EventTrackUnpublished  = "track_unpublished"
	EventRecordingStarted  = "recording_started"
	EventRecordingFinished = "recording_finished"
	EventEgressStarted     = "egress_started"
	EventEgressEnded       = "egress_ended"
)

Variables

View Source
var (
	ErrNoAuthHeader    = errors.New("authorization header could not be found")
	ErrSecretNotFound  = errors.New("API secret could not be found")
	ErrInvalidChecksum = errors.New("could not verify authenticity of message")
)

Functions

func Receive

func Receive(r *http.Request, provider auth.KeyProvider) ([]byte, error)

Receive reads and verifies incoming webhook is signed with key/secret pair closes body after reading

func ReceiveWebhookEvent added in v0.13.0

func ReceiveWebhookEvent(r *http.Request, provider auth.KeyProvider) (*livekit.WebhookEvent, error)

ReceiveWebhookEvent reads and verifies incoming webhook, and returns a parsed WebhookEvent

Types

type Notifier

type Notifier interface {
	Notify(ctx context.Context, payload interface{}) error
}

func NewNotifier

func NewNotifier(apiKey, apiSecret string, urls []string) Notifier

Jump to

Keyboard shortcuts

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