MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / GetForceNamespace

Function GetForceNamespace

x/x.go:287–297  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

285}
286
287func GetForceNamespace(ctx context.Context) string {
288 md, ok := metadata.FromIncomingContext(ctx)
289 if !ok {
290 return ""
291 }
292 ns := md.Get("force-namespace")
293 if len(ns) == 0 {
294 return ""
295 }
296 return ns[0]
297}
298
299func ExtractJwt(ctx context.Context) (string, error) {
300 // extract the jwt and unmarshal the jwt to get the list of groups

Callers 1

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected