namespace_validator.go ×4

Frontier kind: Joint frontier

unlabeled · c_ad5b2463826b

1 test · 2299 LOC · 96 files · introduces 1 test · 33 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges33 lines · 4 files
Tests
1 test

Contains — complete concept membership

All code (extent)
350 ranges2299 lines · 96 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

4 files ranked by introduced lines: 33 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/api/token/v1/message.pb.go 18 introduced LOC · 3 ranges

Open complete file

402 }
403
404 > func (x *QueryTask) Reset() { message.pb.go
405 > *x = QueryTask{}
406 > mi := &file_temporal_server_api_token_v1_message_proto_msgTypes[3]
407 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
408 > ms.StoreMessageInfo(mi)
409 > }
410
411 func (x *QueryTask) String() string {
415 func (*QueryTask) ProtoMessage() {}
416
417 > func (x *QueryTask) ProtoReflect() protoreflect.Message { message.pb.go
418 > mi := &file_temporal_server_api_token_v1_message_proto_msgTypes[3]
419 > if x != nil {
420 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
421 > if ms.LoadMessageInfo() == nil {
422 > ms.StoreMessageInfo(mi)
423 > }
424 > return ms
425 }
426 return mi.MessageOf(x)
432 }
433
434 > func (x *QueryTask) GetNamespaceId() string { message.pb.go
435 > if x != nil {
436 > return x.NamespaceId
437 > }
438 return ""
439 }
go.temporal.io/server/common/rpc/interceptor/namespace_validator.go 7 introduced LOC · 4 ranges

Open complete file

246 err := ni.checkNamespaceMatch(requestNamespaceEntry, tokenNamespaceEntry)
247 if err != nil {
248 > return nil, err namespace_validator.go
249 > }
250
251 // Use namespace from task token (if specified) and ignore namespace from request.
334 // Special case for deprecated RespondQueryTaskCompleted API.
335 if _, ok := req.(*workflowservice.RespondQueryTaskCompletedRequest); ok {
336 > taskToken, err := ni.tokenSerializer.DeserializeQueryTaskToken(taskTokenBytes) namespace_validator.go
337 > if err != nil {
338 return nil, errDeserializingToken
339 }
340 > namespaceID = namespace.ID(taskToken.GetNamespaceId()) namespace_validator.go
341 } else {
342 taskToken, err := ni.tokenSerializer.Deserialize(taskTokenBytes)
359
360 if requestNamespace.ID() != tokenNamespace.ID() {
361 > return errTaskTokenNamespaceMismatch namespace_validator.go
362 > }
363 return nil
364 }
go.temporal.io/server/common/tasktoken/serializer.go 5 introduced LOC · 1 range

Open complete file

33 }
34
35 > func (s *Serializer) DeserializeQueryTaskToken(data []byte) (*tokenspb.QueryTask, error) { serializer.go
36 > taskToken := tokenspb.QueryTask{}
37 > err := taskToken.Unmarshal(data)
38 > return &taskToken, err
39 > }
40
41 func (s *Serializer) SerializeNexusTaskToken(taskToken *tokenspb.NexusTask) ([]byte, error) {
go.temporal.io/server/api/token/v1/message.go-helpers.pb.go 3 introduced LOC · 1 range

Open complete file

123
124 // Unmarshal an object of type QueryTask from the protobuf v3 wire format
125 > func (val *QueryTask) Unmarshal(buf []byte) error { message.go-helpers.pb.go
126 > return proto.Unmarshal(buf, val)
127 > }
128
129 // Size returns the size of the object, in bytes, once serialized