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

Function ExampleRequireApplication

pkg/auth/rights/example_test.go:24–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22)
23
24func ExampleRequireApplication() {
25 var ( // Assume these come from a hypothetical Set RPC call.
26 ctx context.Context
27 dev ttnpb.EndDevice
28 )
29
30 if err := rights.RequireApplication(ctx, dev.Ids.ApplicationIds, ttnpb.Right_RIGHT_APPLICATION_DEVICES_WRITE); err != nil {
31 // return nil, err
32 }
33}

Callers

nothing calls this directly

Calls 1

RequireApplicationFunction · 0.92

Tested by

no test coverage detected