webhook

package
v0.11.13 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 13 Imported by: 7

Documentation

Index

Constants

View Source
const (
	EventRoomStarted       = "room_started"
	EventRoomFinished      = "room_finished"
	EventParticipantJoined = "participant_joined"
	EventParticipantLeft   = "participant_left"
	EventRecordingStarted  = "recording_started"
	EventRecordingFinished = "recording_finished"
)

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

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