public revoke()

in src/auth.ts [60:76]


  public revoke(
    req: IPermissionRequest | IPermissionRequest[],
    options?: grpc.CallOptions,
  ): Promise<this> {
    if (req instanceof Array) {
      return Promise.all(req.map(r => this.grant(r, options))).then(() => this);
    }

    const range = getRange(req);
    return this.client
      .roleRevokePermission({
        role: this.name,
        key: range.start,
        range_end: range.end,
      })
      .then(() => this);
  }