Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The URL to deliver messages to. URL string `json:"url"` // The content-type to set the messages to (unless specified by WRP). ContentType string `json:"content_type"` // The secret to use for the SHA1 HMAC. // Optional, set to "" to disable behavior. Secret string `json:"secret,omitempty"` // The max number of times to retry for webhook MaxRetryCount int `json:"max_retry_count,omitempty"` // alt_urls is a list of explicit URLs that should be round robin on faliure AlternativeURLs []string `json:"alt_urls,omitempty"` }
Configuration for message delivery
type Matcher ¶
type Matcher struct { // The list of regular expressions to match device id type against. DeviceID []string `json:"device_id"` }
Matcher type contains values to match against the metadata.
type W ¶
type W struct { // Configuration for message delivery Config Config `json:"config"` // The URL to notify when we cut off a client due to overflow. // Optional, set to "" to disable behavior FailureURL string `json:"failure_url"` // The list of regular expressions to match event type against. Events []string `json:"events"` // Matcher type contains values to match against the metadata. Matcher Matcher `json:"matcher,omitempty"` // The specified duration for this hook to live Duration time.Duration `json:"duration"` // The absolute time when this hook is to be disabled Until time.Time `json:"until"` // The address that performed the registration Address string `json:"registered_from_address"` }
W is the structure that represents the Webhook listener data we share.
(Note to Wes: this follows the golang naming conventions. webhook.Webhook "stutters", and this type is really the central type of this package. Calling it a single letter is the norm. This could also go in the server package, in which case I'd change the name to Webhook, since service.Webhook works better. See https://blog.golang.org/package-names)
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
basicListener
Module
|
|
configurableListener
Module
|
|
timedListener
Module
|
|
Click to show internal directories.
Click to hide internal directories.