Documentation
¶
Index ¶
Constants ¶
View Source
const ( HeaderID = "svix-id" HeaderTimestamp = "svix-timestamp" HeaderSignature = "svix-signature" DefaultToleranceSeconds = 300 )
Variables ¶
This section is empty.
Functions ¶
func GenerateSignature ¶
Types ¶
type InvalidSignatureError ¶
type InvalidSignatureError struct{}
func (*InvalidSignatureError) Error ¶
func (e *InvalidSignatureError) Error() string
type InvalidTimestampError ¶
type InvalidTimestampError struct{}
func (*InvalidTimestampError) Error ¶
func (e *InvalidTimestampError) Error() string
type MissingHeadersError ¶
type MissingHeadersError struct {
Headers []string
}
func (*MissingHeadersError) Error ¶
func (e *MissingHeadersError) Error() string
type TimestampExpiredError ¶
type TimestampExpiredError struct{}
func (*TimestampExpiredError) Error ¶
func (e *TimestampExpiredError) Error() string
type WebhookValidator ¶
type WebhookValidator struct {
// contains filtered or unexported fields
}
func NewWebhookValidator ¶
func NewWebhookValidator(secretKey string) *WebhookValidator
func NewWebhookValidatorWithTolerance ¶
func NewWebhookValidatorWithTolerance(secretKey string, toleranceSeconds int64) *WebhookValidator
func (*WebhookValidator) VerifyAndUnmarshal ¶
func (v *WebhookValidator) VerifyAndUnmarshal(payload string, headers map[string]string, target interface{}) error
type WebhookVerificationError ¶
type WebhookVerificationError struct {
Message string
}
func (*WebhookVerificationError) Error ¶
func (e *WebhookVerificationError) Error() string
Click to show internal directories.
Click to hide internal directories.