ExtractNamespaceHTTP parses the namespace value from the incoming HTTP request.
(r *http.Request)
| 251 | |
| 252 | // ExtractNamespaceHTTP parses the namespace value from the incoming HTTP request. |
| 253 | func ExtractNamespaceHTTP(r *http.Request) uint64 { |
| 254 | ctx := AttachAccessJwt(context.Background(), r) |
| 255 | // Ignoring error because the default value is zero anyways. |
| 256 | namespace, _ := ExtractNamespaceFrom(ctx) |
| 257 | return namespace |
| 258 | } |
| 259 | |
| 260 | // ExtractNamespace parses the namespace value from the incoming gRPC context. For the non-ACL mode, |
| 261 | // it is caller's responsibility to set the galaxy namespace. |
no test coverage detected