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

Method DeleteNamespace

edgraph/multi_tenancy.go:136–142  ·  view source on GitHub ↗

DeleteNamespace deletes a new namespace. Only superadmin is authorized to do so. Authorization is handled by middlewares.

(ctx context.Context, namespace uint64)

Source from the content-addressed store, hash-verified

134// DeleteNamespace deletes a new namespace. Only superadmin is authorized to do so.
135// Authorization is handled by middlewares.
136func (s *Server) DeleteNamespace(ctx context.Context, namespace uint64) error {
137 glog.Info("Deleting namespace: ", namespace)
138 if _, ok := schema.State().Namespaces()[namespace]; !ok {
139 return errors.Errorf("error deleting non-existing namespace %#x", namespace)
140 }
141 return worker.ProcessDeleteNsRequest(ctx, namespace)
142}

Callers

nothing calls this directly

Calls 5

StateFunction · 0.92
ProcessDeleteNsRequestFunction · 0.92
InfoMethod · 0.80
NamespacesMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected