package
0.0.0-20250112112716-1b1335519635
Repository: https://github.com/adnanh/webhook.git
Documentation: pkg.go.dev
# Functions
CheckIPWhitelist makes sure the provided remote address (of the form IP:port) falls within the provided IP range (in CIDR form or a single IP address).
CheckPayloadSignature calculates and verifies SHA1 signature of the given payload.
CheckPayloadSignature256 calculates and verifies SHA256 signature of the given payload.
CheckPayloadSignature512 calculates and verifies SHA512 signature of the given payload.
No description provided by the author
ExtractCommaSeparatedValues will extract the values matching the key.
ExtractParameterAsString extracts value from interface{} as string based on the passed string.
ExtractSignatures will extract all the signatures from the source.
GetParameter extracts interface{} value based on the passed string.
IsParameterNodeError returns whether err is of type ParameterNodeError.
IsSignatureError returns whether err is of type SignatureError.
ReplaceParameter replaces parameter value with the passed value in the passed map (please note you should pass pointer to the map, because we're modifying it) based on the passed string.
ValidateMAC will verify that the expected mac for the given hash will match the one provided.
# Constants
EnvNamespace is the prefix used for passing arguments into the command environment.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants for the MatchRule type.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
Constants used to specify the parameter source.
# Structs
Argument type specifies the parameter key name and the source it should be extracted from.
ArgumentError describes an invalid argument passed to Hook.
FileParameter describes a pass-file-to-command instance to be stored as file.
Header is a structure containing header name and it's value.
Hook type is a structure containing details for a single hook.
MatchRule will evaluate to true based on the type.
ParameterNodeError describes an error walking a parameter node.
ParseError describes an error parsing user input.
Request represents a webhook request.
Rules is a structure that contains one of the valid rule types.
SignatureError describes an invalid payload signature passed to Hook.
SourceError describes an invalid source passed to Hook.
# Type aliases
AndRule will evaluate to true if and only if all of the ChildRules evaluate to true.
Hooks is an array of Hook objects.
HooksFiles is a slice of String.
NotRule will evaluate to true if any and only if the ChildRule evaluates to false.
OrRule will evaluate to true if any of the ChildRules evaluate to true.
ResponseHeaders is a slice of Header objects.