Options
All
  • Public
  • Public/Protected
  • All
Menu

Class S3Binary<T>

S3Binary handles the storage of binary on a S3 bucket

The structure used for now is /{hash}/data /{hash}/{targetStore}_{uuid} The challenge is stored on the metadata of the data object

It takes parameters bucket: "bucketName" accessKeyId: "" secretAccessKey: "" region: ""

See Binary the general interface

Type parameters

Hierarchy

Implements

Constructors

  • new S3Binary(webda: Core, name: string, params?: any): S3Binary

Properties

AWS: any
_createException: string
_initException: any
_initTime: number
_lowercaseMaps: any
_name: string

Service name

_s3: any
_url: string
_webda: Core

Webda Core object

logger: Logger

Logger with class context

parameters: T

Hold the parameters for your service

It will be bring from the webda.config.json

defaultMaxListeners: number

Methods

  • __clean(): Promise<any>
  • _checkMap(name: any, property: any): void
  • _cleanHash(hash: any): void
  • _cleanUsage(hash: any, uuid: any): Promise<any>
  • _exists(hash: any): boolean
  • _get(info: any): any
  • _getFile(req: any): any
  • _getHashes(buffer: any): any
  • _getPath(hash: any, postfix?: any): string
  • _getS3(hash: any): Promise<any>
  • _getUrl(info: any, ctx: Context): string
  • _initRoutes(): boolean
  • _prepareInput(file: any): void
  • _validChallenge(challenge: any): boolean
  • addListener(event: string | symbol, listener: function): this
  • addRoute(url: string, methods: HttpMethodType[], executer: Function, openapi?: object, allowPath?: boolean): void
  • cascadeDelete(info: any, uuid: any): Promise<any>
  • challenge(hash: any, challenge: any): boolean
  • computeParameters(): void
  • delete(targetStore: any, object: any, property: any, index: any): Promise<any>
  • deleteSuccess(targetStore: any, object: any, property: any, index: any): any
  • downloadTo(info: any, filename: any): Promise<void>
  • emit(event: string | symbol, ...args: any[]): boolean
  • emitSync(event: any, data: any): Promise<any[]>
  • eventNames(): Array<string | symbol>
  • forEachFile(Bucket: string, callback: function, Prefix?: string, filter?: RegExp): Promise<void>
  • get(info: any): Promise<ReadableStream<any>>
  • getARNPolicy(accountId: any): object
  • getMaxListeners(): number
  • getName(): string
  • getObject(key: string, bucket?: string): any
  • getParameters(): T
  • getRedirectUrl(ctx: any): Promise<void>
  • getRedirectUrlFromObject(obj: any, property: any, index: any, context: any, expire?: number): Promise<string>
  • getRedirectUrlInfo(ctx: any): Promise<void>
  • getService<T>(service: string): T
  • getSignedUrl(key: string, action?: string, params?: any): string
  • getUsageCount(hash: any): Promise<number>
  • getWebda(): Core
  • httpChallenge(ctx: Context): Promise<void>
  • httpPost(ctx: Context): Promise<void>
  • httpRoute(ctx: Context): Promise<void>
  • initMap(map: any): void
  • initRoutes(): void
  • listenerCount(type: string | symbol): number
  • listeners(event: string | symbol): Function[]
  • loadParameters(params: any): any
  • off(event: string | symbol, listener: function): this
  • on(event: string | symbol, listener: function): this
  • onAsync(event: any, callback: any, queue?: string): void
  • once(event: string | symbol, listener: function): this
  • prependListener(event: string | symbol, listener: function): this
  • prependOnceListener(event: string | symbol, listener: function): this
  • putMarker(hash: any, uuid: any, storeName: any): any
  • putObject(key: string, body: Buffer | Blob | string | ReadableStream, metadatas?: object, bucket?: string): Promise<void>
  • Parameters

    • key: string
    • body: Buffer | Blob | string | ReadableStream
    • Default value metadatas: object = {}
    • Default value bucket: string = undefined

    Returns Promise<void>

  • putRedirectUrl(ctx: Context): Promise<string>
  • rawListeners(event: string | symbol): Function[]
  • reinit(config: any): Promise<void>
  • removeAllListeners(event?: string | symbol): this
  • removeListener(event: string | symbol, listener: function): this
  • resolve(): void
  • setMaxListeners(n: number): this
  • store(targetStore: any, object: any, property: any, file: any, metadatas: any, index?: string): Promise<any>
  • storeBinary(ctx: Context): Promise<void>
  • toPublicJSON(object: any): string
  • update(targetStore: any, object: any, property: any, index: any, file: any, metadatas: any): Promise<any>
  • updateSuccess(targetStore: any, object: any, property: any, index: any, file: any, metadatas: any): Promise<any>
  • getModda(): ModdaDefinition
  • listenerCount(emitter: EventEmitter, event: string | symbol): number

Generated using TypeDoc