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

Function WithVisibility

pkg/events/options.go:63–67  ·  view source on GitHub ↗

WithVisibility returns an option that sets the visibility of the event.

(rights ...ttnpb.Right)

Source from the content-addressed store, hash-verified

61
62// WithVisibility returns an option that sets the visibility of the event.
63func WithVisibility(rights ...ttnpb.Right) Option {
64 return optionFunc(func(e *event) {
65 e.innerEvent.Visibility = ttnpb.RightsFrom(rights...)
66 })
67}
68
69// WithAuthFromContext returns an option that extracts auth information from the context when the event is created.
70func WithAuthFromContext() Option {

Callers 15

runTestSubscriptionsFunction · 0.92
observability.goFile · 0.92
observability.goFile · 0.92
observability.goFile · 0.92
observability.goFile · 0.92
observability.goFile · 0.92
observability.goFile · 0.92
macEventOptionsFunction · 0.92
defineClassSwitchEventFunction · 0.92
observability.goFile · 0.92

Calls 2

RightsFromFunction · 0.92
optionFuncFuncType · 0.70

Tested by 4

runTestSubscriptionsFunction · 0.74
TestDefinitionsFunction · 0.74
TestUnmarshalJSONFunction · 0.74
ExampleFunction · 0.74