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

Function forbiddenPaths

pkg/rpcmiddleware/validator/validator.go:76–86  ·  view source on GitHub ↗
(requestedPaths []string, allowedPaths map[string]struct{})

Source from the content-addressed store, hash-verified

74var errForbiddenFieldMaskPaths = errors.DefineInvalidArgument("field_mask_paths", "forbidden path(s) in field mask", "forbidden_paths")
75
76func forbiddenPaths(requestedPaths []string, allowedPaths map[string]struct{}) []string {
77 var forbiddenPaths []string
78nextRequestedPath:
79 for _, requestedPath := range requestedPaths {
80 if _, ok := allowedPaths[requestedPath]; ok {
81 continue nextRequestedPath
82 }
83 forbiddenPaths = append(forbiddenPaths, requestedPath)
84 }
85 return forbiddenPaths
86}
87
88func convertError(err error) error {
89 if ttnErr, ok := errors.From(err); ok {

Callers 1

validateMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected