Interface ObjectStore

interface ObjectStore {
    delete(name: string): Promise<PurgeResponse>;
    destroy(): Promise<boolean>;
    get(name: string): Promise<ObjectResult>;
    getBlob(name: string): Promise<Uint8Array>;
    info(name: string): Promise<ObjectInfo>;
    link(name: string, meta: ObjectInfo): Promise<ObjectInfo>;
    linkStore(name: string, bucket: ObjectStore): Promise<ObjectInfo>;
    list(): Promise<ObjectInfo[]>;
    put(meta: ObjectStoreMeta, rs: ReadableStream<Uint8Array>, opts?: ObjectStorePutOpts): Promise<ObjectInfo>;
    putBlob(meta: ObjectStoreMeta, data: Uint8Array, opts?: ObjectStorePutOpts): Promise<ObjectInfo>;
    seal(): Promise<ObjectStoreStatus>;
    status(opts?: Partial<StreamInfoRequestOptions>): Promise<ObjectStoreStatus>;
    update(name: string, meta: Partial<ObjectStoreMeta>): Promise<PubAck>;
    watch(opts?: Partial<{
        ignoreDeletes?: boolean;
        includeHistory?: boolean;
    }>): Promise<QueuedIterator<ObjectInfo>>;
}

Methods

  • Deletes the specified entry from the object store.

    Parameters

    • name: string

    Returns Promise<PurgeResponse>

  • Destroys the object store and all its entries.

    Returns Promise<boolean>

  • Returns an object you can use for reading the data from the named stored object or null if the entry doesn't exist.

    Parameters

    • name: string

    Returns Promise<ObjectResult>

  • Returns the data stored for the named entry.

    Parameters

    • name: string

    Returns Promise<Uint8Array>

  • Returns the ObjectInfo of the named entry. Or null if the entry doesn't exist.

    Parameters

    • name: string

    Returns Promise<ObjectInfo>

  • Adds a link to another object in the same store or a different one. Note that links of links are rejected. object.

    Parameters

    Returns Promise<ObjectInfo>

  • Add a link to another object store

    Parameters

    Returns Promise<ObjectInfo>

  • Returns a list of the entries in the ObjectStore

    Returns Promise<ObjectInfo[]>

  • Adds an object to the store with the specified meta and using the specified ReadableStream to stream the data.

    Parameters

    Returns Promise<ObjectInfo>

  • Returns the runtime status of the object store.

    Parameters

    • Optionalopts: Partial<StreamInfoRequestOptions>

    Returns Promise<ObjectStoreStatus>

  • Update the metadata for an object. If the name is modified, the object is effectively renamed and will only be accessible by its new name.

    Parameters

    Returns Promise<PubAck>

  • Watch an object store and receive updates of modifications via an iterator.

    Parameters

    • Optionalopts: Partial<{
          ignoreDeletes?: boolean;
          includeHistory?: boolean;
      }>

    Returns Promise<QueuedIterator<ObjectInfo>>