Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDetect ¶
DefaultDetect checks if the body contains subscription and message json fields
Types ¶
type DetectFunc ¶
DetectFunc detects if the request is a pubsub push request. Request will have already been tested to see if body is json and method is POST.
type Option ¶
type Option func(*Options)
Option is a single option when creating middleware.
func WithDetector ¶
func WithDetector(detect DetectFunc) Option
WithDetector sets the function to call to detect if the request body is a pubsub push request. If not set, DefaultDetect is used.
func WithPrefixes ¶
WithPrefixes sets the middleware to only run for the given prefixes. By default, all requests are checked. Prefixes are checked using simple string prefix checks.
Click to show internal directories.
Click to hide internal directories.