Skip to main content

IBinaryStore

@webda/core


Interface: IBinaryStore

Defined in: packages/core/src/core/icore.ts:263

Represent a Binary Store

Extends​

Properties​

_compiledCapabilities​

protected _compiledCapabilities: Record<string, any> = {}

Defined in: packages/core/src/services/iservice.ts:58

Capabilities detected at compile-time from @WebdaCapability-tagged interfaces.

Populated during Service.resolve by reading the service's entry in webda.module.json. Each key is a capability name (e.g., "request-filter"), and the value is an empty object {} by default. Override getCapabilities to provide capability-specific configuration or to conditionally disable capabilities.

See​

getCapabilities

Inherited from​

AbstractService._compiledCapabilities


name​

readonly name: string

Defined in: packages/core/src/services/iservice.ts:35

Inherited from​

AbstractService.name


parameters​

readonly parameters: ServiceParameters

Defined in: packages/core/src/services/iservice.ts:36

Inherited from​

AbstractService.parameters

Methods​

addListener()​

addListener<Key>(eventName, listener): this

Defined in: packages/core/src/events/asynceventemitter.ts:83

Type Parameters​

Key​

Key extends never

Parameters​

eventName​

Key

the event name

listener​

(event) => void | Promise<void>

the event listener

Returns​

this

this for chaining

See​

EventEmitter.addListener

Inherited from​

AbstractService.addListener


emit()​

emit<Key>(eventName, event): Promise<void>

Defined in: packages/core/src/events/asynceventemitter.ts:165

Emit an event for this class

Instead of returning a boolean, this method returns a Promise so you can decide to wait for the event to be processed or not

Type Parameters​

Key​

Key extends never

Parameters​

eventName​

Key

the event name

event​

object[Key]

the event name

Returns​

Promise<void>

See​

EventEmitter.emit

Inherited from​

AbstractService.emit


getCapabilities()​

getCapabilities(): Record<string, any>

Defined in: packages/core/src/services/iservice.ts:86

Return the capabilities of this service.

By default returns capabilities detected at compile-time from

Returns​

Record<string, any>

the result

Webda Capability-tagged​

interfaces in webda.module.json.

Override to disable capabilities based on configuration:

getCapabilities() {
const caps = super.getCapabilities();
if (!this.parameters.enabled) delete caps["request-filter"];
return caps;
}

Inherited from​

AbstractService.getCapabilities


getMaxListeners()​

getMaxListeners(): number

Defined in: packages/core/src/events/asynceventemitter.ts:90

Returns​

number

Inherited from​

AbstractService.getMaxListeners


getName()​

abstract getName(): string

Defined in: packages/core/src/services/iservice.ts:107

Get the name of the service

Returns​

string

Deprecated​

use name directly

Inherited from​

AbstractService.getName


getOpenApiReplacements()​

abstract getOpenApiReplacements(): object

Defined in: packages/core/src/services/iservice.ts:115

Get OpenAPI replacements

Returns​

object

Inherited from​

AbstractService.getOpenApiReplacements


getState()​

abstract getState(): string

Defined in: packages/core/src/services/iservice.ts:101

Return the state of initialization

Returns​

string

Inherited from​

AbstractService.getState


init()​

abstract init(): Promise<IBinaryStore>

Defined in: packages/core/src/services/iservice.ts:93

Initialize the service

Returns​

Promise<IBinaryStore>

Inherited from​

AbstractService.init


listeners()​

listeners(eventName): Function[]

Defined in: packages/core/src/events/asynceventemitter.ts:183

Get all listeners for an event

Parameters​

eventName​

never

the event name

Returns​

Function[]

the list of results

Inherited from​

AbstractService.listeners


off()​

off<Key>(eventName, listener): this

Defined in: packages/core/src/events/asynceventemitter.ts:141

Type Parameters​

Key​

Key extends never

Parameters​

eventName​

Key

the event name

listener​

(event) => void

the event listener

Returns​

this

this for chaining

See​

EventEmitter.off

Inherited from​

AbstractService.off


on()​

on<Key>(eventName, listener): this

Defined in: packages/core/src/events/asynceventemitter.ts:119

Type Parameters​

Key​

Key extends never

Parameters​

eventName​

Key

the event name

listener​

(event) => void

the event listener

Returns​

this

this for chaining

See​

EventEmitter.once

Inherited from​

AbstractService.on


once()​

once<Key>(eventName, listener): this

Defined in: packages/core/src/events/asynceventemitter.ts:108

Type Parameters​

Key​

Key extends never

Parameters​

eventName​

Key

the event name

listener​

(event) => void

the event listener

Returns​

this

this for chaining

See​

EventEmitter.once

Inherited from​

AbstractService.once


removeAllListeners()​

removeAllListeners<Key>(eventName?): this

Defined in: packages/core/src/events/asynceventemitter.ts:150

Type Parameters​

Key​

Key extends never

Parameters​

eventName?​

Key

the event name

Returns​

this

this for chaining

See​

EventEmitter.removeAllListeners

Inherited from​

AbstractService.removeAllListeners


removeListener()​

removeListener<Key>(eventName, listener): this

Defined in: packages/core/src/events/asynceventemitter.ts:130

Type Parameters​

Key​

Key extends never

Parameters​

eventName​

Key

the event name

listener​

(event) => void

the event listener

Returns​

this

this for chaining

See​

EventEmitter.removeListener

Inherited from​

AbstractService.removeListener


resolve()​

abstract resolve(): this

Defined in: packages/core/src/services/iservice.ts:97

All services should be able to resolve themselves

Returns​

this

Inherited from​

AbstractService.resolve


setMaxListeners()​

setMaxListeners(n): this

Defined in: packages/core/src/events/asynceventemitter.ts:97

Parameters​

n​

number

Returns​

this

Inherited from​

AbstractService.setMaxListeners


stop()​

abstract stop(): Promise<void>

Defined in: packages/core/src/services/iservice.ts:111

Stop the service

Returns​

Promise<void>

Inherited from​

AbstractService.stop