add (untested) function to set webhook with certificate
This commit is contained in:
parent
87a279827e
commit
ca40caaa47
2 changed files with 40 additions and 7 deletions
14
helpers.go
14
helpers.go
|
@ -237,3 +237,17 @@ func NewWebhook(link string) WebhookConfig {
|
|||
Clear: false,
|
||||
}
|
||||
}
|
||||
|
||||
// NewWebhookWithCert creates a new webhook with a selfsigned certificate.
|
||||
//
|
||||
// link is the url you wish to get webhooks,
|
||||
// file contains a string to a file, or a FileReader or FileBytes.
|
||||
func NewWebhookWithCert(link string, file interface{}) WebhookConfig {
|
||||
u, _ := url.Parse(link)
|
||||
|
||||
return WebhookConfig{
|
||||
URL: u,
|
||||
Clear: false,
|
||||
Certificate: file,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue