Subset of repo DataStore functions needed by AccessManager.

interface DataStore {
    find: (interest: Interest) => Promise<undefined | Data>;
    get: (name: Name) => Promise<undefined | Data>;
    insert: (
        ...args:
            | (Data | AnyIterable<Data>)[]
            | [{}, ...(Data | AnyIterable<Data>)[]],
    ) => Promise<void>;
}

Hierarchy (View Summary)

Properties

Properties

find: (interest: Interest) => Promise<undefined | Data>

Find Data that satisfies Interest.

get: (name: Name) => Promise<undefined | Data>

Retrieve Data by exact name.

insert: (
    ...args:
        | (Data | AnyIterable<Data>)[]
        | [{}, ...(Data | AnyIterable<Data>)[]],
) => Promise<void>

Insert one or more Data packets.

Arguments include:

  • an optional Options object
  • zero or more Data, Iterable, or AsyncIterable