MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / WithIdentifiers

Function WithIdentifiers

pkg/events/options.go:40–46  ·  view source on GitHub ↗

WithIdentifiers returns an option that sets the identifiers of the event.

(identifiers ...EntityIdentifiers)

Source from the content-addressed store, hash-verified

38
39// WithIdentifiers returns an option that sets the identifiers of the event.
40func WithIdentifiers(identifiers ...EntityIdentifiers) Option {
41 return optionFunc(func(e *event) {
42 for _, ids := range identifiers {
43 e.innerEvent.Identifiers = append(e.innerEvent.Identifiers, ids.GetEntityIdentifiers())
44 }
45 })
46}
47
48// WithData returns an option that sets the data of the event.
49func WithData(data any) Option {

Callers 15

TestMuxFunction · 0.92
runTestSubscriptionsFunction · 0.92
AuthorizeMethod · 0.92
TokenMethod · 0.92
TestProcessDownlinkTaskFunction · 0.92
makeOTAAFlowTestFunction · 0.92
AssertSetDeviceMethod · 0.92
AssertJoinMethod · 0.92

Calls 2

optionFuncFuncType · 0.70
GetEntityIdentifiersMethod · 0.65

Tested by 15

TestMuxFunction · 0.74
runTestSubscriptionsFunction · 0.74
TestProcessDownlinkTaskFunction · 0.74
makeOTAAFlowTestFunction · 0.74
AssertSetDeviceMethod · 0.74
AssertJoinMethod · 0.74
TestUnmarshalJSONFunction · 0.74
TestMultiplexingFunction · 0.74
TestBackendFunction · 0.74