Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultSignatureHeader = "X-GoHooks-Verification"
)
Variables ¶
This section is empty.
Functions ¶
func IsGoHookValid ¶
IsGoHookValid checks the sha256 of the data matches the one given on the signature.
Types ¶
type GoHook ¶
type GoHook struct { // Data to be sent in the GoHook Payload GoHookPayload // The encrypted SHA resulting with the used salt ResultingSha string // Prepared JSON marshaled data PreparedData []byte // Choice of signature header to use on sending a GoHook SignatureHeader string // Should validate SSL certificate IsSecure bool // Preferred HTTP method to send the GoHook // Please choose only POST, DELETE, PATCH or PUT // Any other value will make the send use POST as fallback PreferredMethod string }
GoHook represents the definition of a GoHook.
type GoHookPayload ¶
type GoHookPayload struct { Resource string `json:"resource"` Data interface{} `json:"data"` }
GoHookPayload represents the data that will be sent in the GoHook.
Click to show internal directories.
Click to hide internal directories.