Files
plugin-drone-webhook/template.go
T
Thomas Boerger 69b094965b Refactoring and new plugin lib
This commit is doing a general refactoring of the current code base and
it also integrates the new plugin lib.
2019-09-16 23:22:59 +02:00

28 lines
462 B
Go

package main
import (
"net/http"
)
// webhook defines the result payload.
type webhook struct {
Number int
URL string
Method string
Header http.Header
Status string
Request string
Response string
Debug bool
}
// result defines the output template.
const result = `Webhook {{Number}}
URL: {{URL}}{{#if Debug}}
METHOD: {{Method}}
HEADERS: {{Headers}}
REQUEST: {{Request}}{{/if}}
STATUS: {{Status}}
RESPONSE: {{Response}}
`