Documentation ¶
Index ¶
Constants ¶
View Source
const ( // A unique ID that identifies the delivered webhook WebhookIDHeader = "X-SHELLHUB-WEBHOOK-ID" // Name of the event that has been triggered WebhookEventHeader = "X-SHELLHUB-WEBHOOK-EVENT" // A signature created using the webhook secret key WebhookSignatureHeader = "X-SHELLHUB-WEBHOOK-SIGNATURE" )
Webhook request headers
View Source
const ( ConnectionFailedErr = "Connection failed" ForbiddenErr = "Not allowed" UnknownErr = "Unknown error" )
View Source
const (
// A new connection was made to the SSH Server
WebhookIncomingConnectionEvent = "incoming_connection"
)
Webhook event types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncomingConnectionWebhookRequest ¶
type IncomingConnectionWebhookRequest struct { Username string `json:"username"` Hostname string `json:"hostname"` Namespace string `json:"namespace"` SourceIP string `json:"source_ip"` }
IncomingConnectionWebhookRequest is the body payload
type IncomingConnectionWebhookResponse ¶
type IncomingConnectionWebhookResponse struct { // Timeout to wait for connection to be established Timeout int `json:"timeout"` }
IncommingConnectionWebhookResponse is the expected response body
type Webhook ¶
type Webhook interface {
Connect(m map[string]string) (*IncomingConnectionWebhookResponse, error)
}
type WebhookOptions ¶
Click to show internal directories.
Click to hide internal directories.