Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultSignatureHeader is used as default signature header
DefaultSignatureHeader = "X-GoWebHooks-Verification"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoWebHook ¶
type GoWebHook struct {
// Data to be sent in the GoWebHook
Payload GoWebHookPayload
// 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 GoWebHook
SignatureHeader string
// Should validate SSL certificate
IsSecure bool
// Preferred HTTP method to send the GoWebHook
// Please choose only POST, DELETE, PATCH or PUT
// Any other value will make the send use POST as fallback
PreferredMethod string
// Additional HTTP headers to be added to the hook
AdditionalHeaders map[string]string
}
GoWebHook represents the definition of a GoWebHook.
type GoWebHookPayload ¶
type GoWebHookPayload struct {
Resource string `json:"resource"`
Data interface{} `json:"data"`
}
GoWebHookPayload represents the data that will be sent in the GoWebHook.
type Repository ¶
type Repository struct {
FullName string `json:"full_name"`
PullNumber string `json:"pull_number"`
}
Repository struct - part of Webhook struct
type Webhook ¶
type Webhook struct {
Path string `json:"path"`
RepositoryURL string `json:"repository_url"`
Repository `json:"repository"`
}
Webhook struct used for sending webhooks to https://smee.io/
Click to show internal directories.
Click to hide internal directories.