nuclei/pkg/js/generated/ts/redis.ts
Tarun Koyalwar 36985345a9
javascript bindings + docs generation enhancements ( generate typescript defination .d.ts files) (#4487)
* introduce typescript files generation using ast + tmpl

* feat valid ts with scraping

* feat remove old logic + tsdocs for all modules

* fix ikev and related bugs

* typescript docs for js modules

* lint,build + ldap realm fix

* go mod tidy

* fix named imports ast parsing

* fix ast code generation errors

* complete support for ts files generation

* support go global/const in ts docs

* updated template

* feat: typescript using go code generation

* nuke jsdoc generator

* update generated ts dir structure

* fix multifile ts gen issue

* fix panic in ts code gen

* fix test

* update docs of js libs

* feat: add doc+example for every js class,function,method

* fix missing quotes in ikev example

---------

Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
2024-02-07 21:45:40 +05:30

71 lines
1.6 KiB
TypeScript
Executable File

/**
* Connect tries to connect redis server with password
* @example
* ```javascript
* const redis = require('nuclei/redis');
* const connected = redis.Connect('acme.com', 6379, 'password');
* ```
*/
export function Connect(host: string, port: number, password: string): boolean | null {
return null;
}
/**
* GetServerInfo returns the server info for a redis server
* @example
* ```javascript
* const redis = require('nuclei/redis');
* const info = redis.GetServerInfo('acme.com', 6379);
* ```
*/
export function GetServerInfo(host: string, port: number): string | null {
return null;
}
/**
* GetServerInfoAuth returns the server info for a redis server
* @example
* ```javascript
* const redis = require('nuclei/redis');
* const info = redis.GetServerInfoAuth('acme.com', 6379, 'password');
* ```
*/
export function GetServerInfoAuth(host: string, port: number, password: string): string | null {
return null;
}
/**
* IsAuthenticated checks if the redis server requires authentication
* @example
* ```javascript
* const redis = require('nuclei/redis');
* const isAuthenticated = redis.IsAuthenticated('acme.com', 6379);
* ```
*/
export function IsAuthenticated(host: string, port: number): boolean | null {
return null;
}
/**
* RunLuaScript runs a lua script on the redis server
* @example
* ```javascript
* const redis = require('nuclei/redis');
* const result = redis.RunLuaScript('acme.com', 6379, 'password', 'return redis.call("get", KEYS[1])');
* ```
*/
export function RunLuaScript(host: string, port: number, password: string, script: string): any | null {
return null;
}