Documentation
¶
Overview ¶
Package hello is a minimal GoRun extension speaking the HTTP bridge protocol (docs/EXTENSIONS.md). It verifies every delivery's HMAC signature, logs actions and events, and implements one filter: content.before_save appends " — via hello" to the title.
It uses only the standard library on purpose: it is what a third-party extension written in Go looks like. Run it with
HELLO_SECRET=<secret shown at install> go run ./examples/extensions/hello-http/cmd/hello-http
GoRun's tests mount Handler behind httptest.
Index ¶
Constants ¶
const Suffix = " — via hello"
Suffix is what the content.before_save filter appends to titles.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Delivery ¶
type Delivery struct {
Hook string `json:"hook"`
Kind string `json:"kind"`
Payload json.RawMessage `json:"payload"`
Site json.RawMessage `json:"site"`
TS int64 `json:"ts"`
DeliveryID string `json:"delivery_id"`
}
Delivery is one verified bridge request.
type Server ¶
Server is the extension's HTTP handler.
func Handler ¶
Handler returns the extension handler verifying deliveries with secret (the HMAC secret GoRun shows once at install).
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
hello-http
command
Command hello-http runs the hello example extension:
|
Command hello-http runs the hello example extension: |