UNPKG

@dolittle/sdk.common

Version:

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

40 lines 2 kB
import { Constructor } from '@dolittle/types'; import { IClientBuildResults } from '../ClientSetup/IClientBuildResults'; import { AnyIdentifier } from './Identifier'; import { IModel } from './IModel'; import { ProcessorBuilder } from './ProcessorBuilder'; /** * Defines a builder for building a Dolittle application model. */ export declare abstract class IModelBuilder { /** * Adds a binding between an identifier and a type. * @param {Identifier} identifier - The identifier to bind. * @param {Constructor} type - The type to bind the identifier to. */ abstract bindIdentifierToType(identifier: AnyIdentifier, type: Constructor<any>): void; /** * Removes a binding between an identifier and a type. * @param {Identifier} identifier - The identifier to bind. * @param {Constructor} type - The type to bind the identifier to. */ abstract unbindIdentifierFromType(identifier: AnyIdentifier, type: Constructor<any>): void; /** * Adds a binding between an identifier and a processor builder. * @param {Identifier} identifier - The identifier to bind. * @param {ProcessorBuilder} processorBuilder - The processor builder to bind the identifier to. */ abstract bindIdentifierToProcessorBuilder(identifier: AnyIdentifier, processorBuilder: ProcessorBuilder): void; /** * Removes a binding between an identifier and a processor builder. * @param {Identifier} identifier - The identifier to bind. * @param {ProcessorBuilder} processorBuilder - The processor builder to bind the identifier to. */ abstract unbindIdentifierFromProcessorBuilder(identifier: AnyIdentifier, processorBuilder: ProcessorBuilder): void; /** * Builds a valid Dolittle application model from the bindings. * @param {IClientBuildResults} buildResults - For keeping track of build results. */ abstract build(buildResults: IClientBuildResults): IModel; } //# sourceMappingURL=IModelBuilder.d.ts.map