internal

package
v3.30.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package internal contains internal webhook utilities.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL