add/rm namespaces via cli
This commit is contained in:
15
rpc/rpc.go
15
rpc/rpc.go
@@ -146,6 +146,21 @@ func (t *Query) Delete(np *NamespaceService, success *bool) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Query) AddNamespace(namespace *string, _ *int) error {
|
||||
_, err := StorageHandler.AddNamespace(*namespace)
|
||||
return err
|
||||
}
|
||||
|
||||
func (t *Query) DeleteNamespace(namespace *string, _ *int) error {
|
||||
err := StorageHandler.DeleteNamespace(*namespace)
|
||||
return err
|
||||
}
|
||||
|
||||
func (t *Query) ListNamespaces(_ *int, reply *[]string) error {
|
||||
*reply = StorageHandler.ListNamespaces()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Query) GetAllNames(namespace *string, reply *[]string) error {
|
||||
fmt.Println("RPC Request: Query::LoadedTriggers")
|
||||
fmt.Printf("Listing content of %s", *namespace)
|
||||
|
||||
Reference in New Issue
Block a user