-
Notifications
You must be signed in to change notification settings - Fork 722
/
webhook_context.go
28 lines (26 loc) · 1.44 KB
/
webhook_context.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
)
// WebhookContext holds a general purpose REST API context
type WebhookContext struct {
// REST API endpoint
Endpoint string `json:"endpoint" protobuf:"bytes,1,opt,name=endpoint"`
// Method is HTTP request method that indicates the desired action to be performed for a given resource.
// See RFC7231 Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
Method string `json:"method" protobuf:"bytes,2,opt,name=method"`
// Port on which HTTP server is listening for incoming events.
Port string `json:"port" protobuf:"bytes,3,opt,name=port"`
// URL is the url of the server.
URL string `json:"url" protobuf:"bytes,4,opt,name=url"`
// ServerCertPath refers the file that contains the cert.
ServerCertSecret *corev1.SecretKeySelector `json:"serverCertSecret,omitempty" protobuf:"bytes,5,opt,name=serverCertSecret"`
// ServerKeyPath refers the file that contains private key
ServerKeySecret *corev1.SecretKeySelector `json:"serverKeySecret,omitempty" protobuf:"bytes,6,opt,name=serverKeySecret"`
// Metadata holds the user defined metadata which will passed along the event payload.
// +optional
Metadata map[string]string `json:"metadata,omitempty" protobuf:"bytes,7,rep,name=metadata"`
// AuthSecret holds a secret selector that contains a bearer token for authentication
// +optional
AuthSecret *corev1.SecretKeySelector `json:"authSecret,omitempty" protobuf:"bytes,8,opt,name=authSecret"`
}