-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.d.ts
43 lines (40 loc) · 2.75 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
declare function Callback(error: Error, res?: any): void;
declare type BatchOperation = {
type?: string,
key: string,
value?: string,
};
declare module 'bucketclient' {
export class RESTClient {
constructor(
host: string | string[],
logApi: object | null,
useHttps: bool,
key?: string,
cert?: string,
ca?: string,
);
getPort(): number;
getRaftInformation(bucketName: string, reqUids: string[], callback: Callback, reqLogger?: any): void;
getBucketLeader(bucketName: string, reqUids: string[], callback: Callback, reqLogger?: any): void;
getBucketAttributes(bucketName: string, reqUids: string[], callback: Callback, reqLogger?: any): void;
putBucketAttributes(bucketName: string, reqUids: string[], attributes: string, callback: Callback, reqLogger: any): void;
createBucket(bucketName: string, reqUids: string[], attributes: string, callback: Callback, reqLogger: any): void;
deleteBucket(bucketName: string, reqUids: string[], callback: Callback, reqLogger: any): void;
putObject(bucketName: string, objName: string, objVal: string, reqUids: string[], callback: Callback, params: any, reqLogger: any): void;
getObject(bucketName: string, objName: string, reqUids: string[], callback: Callback, params: any, reqLogger: any): void;
getBucketAndObject(bucketName: string, objName: string, reqUids: string[], callback: Callback, params: any, reqLogger: any): void;
deleteObject(bucketName: string, objName: string, reqUids: string[], callback: Callback, params: any, reqLogger: any): void;
listObject(bucketName: string, reqUids: string[], params: any, cb: Callback, reqLogger: any): void;
getAllRafts(reqUids: string[], callback: Callback, reqLogger: any): void;
getRaftLog(raftId: string, start: number, limit: number, targetLeader: boolean, reqUids: string[], callback: Callback, reqLogger: any): void;
getRaftBuckets(raftId: string, reqUids: string[], callback: Callback, reqLogger: any): void;
getBucketInformation(bucketName: string, reqUids: string[], callback: Callback, reqLogger: any): void;
execBatch(bucketName: string, batch: Array<BatchOperation>, reqUids: string[], callback: Callback, reqLogger: any): void;
healthcheck(log: any, callback: Callback): void;
livecheck(log: any, callback: Callback): void;
private endRespond(res: any, ret: any, log: any, callback: Callback): void;
private request(method: string, beginPath: string, log: any, params: any, data: any, callback: Callback): void;
private requestStreamed(method: string, beginPath: string, log: any, params: any, data: any, callback: Callback): void;
}
}