1 | import { ConfigParams } from 'pip-services3-commons-node';
|
2 | import { FileConfigReader } from './FileConfigReader';
|
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 | export declare class JsonConfigReader extends FileConfigReader {
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 | constructor(path?: string);
|
37 | /**
|
38 | * Reads configuration file, parameterizes its content and converts it into JSON object.
|
39 | *
|
40 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
41 | * @param parameters values to parameters the configuration.
|
42 | * @returns a JSON object with configuration.
|
43 | */
|
44 | readObject(correlationId: string, parameters: ConfigParams): any;
|
45 | /**
|
46 | * Reads configuration and parameterize it with given values.
|
47 | *
|
48 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
49 | * @param parameters values to parameters the configuration
|
50 | * @param callback callback function that receives configuration or error.
|
51 | */
|
52 | readConfig(correlationId: string, parameters: ConfigParams, callback: (err: any, config: ConfigParams) => void): void;
|
53 | /**
|
54 | * Reads configuration file, parameterizes its content and converts it into JSON object.
|
55 | *
|
56 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
57 | * @param file a path to configuration file.
|
58 | * @param parameters values to parameters the configuration.
|
59 | * @returns a JSON object with configuration.
|
60 | */
|
61 | static readObject(correlationId: string, path: string, parameters: ConfigParams): any;
|
62 | /**
|
63 | * Reads configuration from a file, parameterize it with given values and returns a new ConfigParams object.
|
64 | *
|
65 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
66 | * @param file a path to configuration file.
|
67 | * @param parameters values to parameters the configuration.
|
68 | * @param callback callback function that receives configuration or error.
|
69 | */
|
70 | static readConfig(correlationId: string, path: string, parameters: ConfigParams): ConfigParams;
|
71 | }
|