The object store bucket interface.

interface IObjectStoreBucket {
    close(): void;
    get(path): Promise<File>;
    getName(): string;
    getOwnerId(): string;
    list(path, recursive?): Promise<ObjectDescriptor[]>;
    publish(payload): Promise<void>;
    subscribe(callback): void;
    unpublish(path): Promise<void>;
    unsubscribe(): void;
}

Hierarchy (view full)

Methods

  • Close the bucket.

    Returns void

  • Get an object from the bucket.

    Parameters

    • path: string

      The path of the object.

    Returns Promise<File>

    The object.

  • List the objects and folders of the bucket.

    Parameters

    • path: string

      The path of the folder.

    • Optional recursive: boolean

      Whether to list the objects and folders recursively.

    Returns Promise<ObjectDescriptor[]>

    The list of objects and folders.

  • Publish an action to the bucket.

    Parameters

    • payload: Payload

      The object store payload.

    Returns Promise<void>

    A promise that resolves when the action is published.

  • Subscribe to the bucket events.

    Parameters

    • callback: ((data) => void)

      The callback function.

    Returns void

  • Unpublish an object from the bucket. It also permanently deletes the object.

    Parameters

    • path: string

      The path of the object.

    Returns Promise<void>

    A promise that resolves when the object is unpublished.

  • Unsubscribe from the bucket.

    Returns void

Generated using TypeDoc