webhook

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventRoomStarted       = "room_started"
	EventRoomFinished      = "room_finished"
	EventParticipantJoined = "participant_joined"
	EventParticipantLeft   = "participant_left"
	EventTrackPublished    = "track_published"
	EventTrackUnpublished  = "track_unpublished"
	EventEgressStarted     = "egress_started"
	EventEgressUpdated     = "egress_updated"
	EventEgressEnded       = "egress_ended"
	EventIngressStarted    = "ingress_started"
	EventIngressEnded      = "ingress_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

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