Documentation ¶
Overview ¶
Package internal contains internal webhook utilities.
Index ¶
- func DeviceIDFromContext(ctx context.Context) *ttnpb.EndDeviceIdentifiers
- func WebhookHealthFromContext(ctx context.Context) (*ttnpb.ApplicationWebhookHealth, bool)
- func WebhookIDFromContext(ctx context.Context) *ttnpb.ApplicationWebhookIdentifiers
- func WithWebhookData(ctx context.Context, data *WebhookData) context.Context
- type WebhookData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeviceIDFromContext ¶
func DeviceIDFromContext(ctx context.Context) *ttnpb.EndDeviceIdentifiers
DeviceIDFromContext returns the EndDeviceIdentifiers from the context.
func WebhookHealthFromContext ¶
func WebhookHealthFromContext(ctx context.Context) (*ttnpb.ApplicationWebhookHealth, bool)
WebhookHealthFromContext returns the ApplicationWebhookHealth from the context.
func WebhookIDFromContext ¶
func WebhookIDFromContext(ctx context.Context) *ttnpb.ApplicationWebhookIdentifiers
WebhookIDFromContext returns the ApplicationWebhookIdentifiers from the context.
func WithWebhookData ¶
func WithWebhookData(ctx context.Context, data *WebhookData) context.Context
WithWebhookData returns a new context with the given WebhookData.
Types ¶
type WebhookData ¶
type WebhookData struct { EndDeviceIDs *ttnpb.EndDeviceIdentifiers WebhookIDs *ttnpb.ApplicationWebhookIdentifiers Health interface { // Health should always be either nil or *ttnpb.ApplicationWebhookHealth. // As Go does not support sum types, this interface acts as a workaround. GetHealthy() *ttnpb.ApplicationWebhookHealth_WebhookHealthStatusHealthy } }
WebhookData contains the data that is passed through the context.
Click to show internal directories.
Click to hide internal directories.