refactored DockerfileServiceImpl to return promise instead of callbacks
This commit is contained in:
commit
4e913f106d
34 changed files with 299 additions and 490 deletions
|
@ -7,19 +7,9 @@ export abstract class DockerfileService {
|
|||
/**
|
||||
* Retrieve Dockerfile from given file.
|
||||
* @param file Dockerfile or archive file containing Dockerfile.
|
||||
* @param success Success callback with retrieved Dockerfile as parameter.
|
||||
* @param failure Failure callback with failure message as parameter.
|
||||
* @return promise Promise which resolves to new DockerfileInfo instance or rejects with error message.
|
||||
*/
|
||||
public abstract getDockerfile(file: any,
|
||||
success: (dockerfile: DockerfileInfo) => void,
|
||||
failure: (error: ErrorEvent | string) => void): void;
|
||||
|
||||
/**
|
||||
* Retrieve Dockerfile from given file.
|
||||
* @param file Dockerfile or archive file containing Dockerfile.
|
||||
* @return promise Promise resolving to new DockerfileInfo instance or rejecting to error message.
|
||||
*/
|
||||
public abstract extractDockerfile(file: any): Promise<DockerfileInfo | string>;
|
||||
public abstract getDockerfile(file: any): Promise<DockerfileInfo | string>;
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in a new issue