Hosanna UI API v1.30.2-next
    Preparing search index...

    Interface IDeviceRegistry

    Interface representing a device registry for storing key-value pairs.

    interface IDeviceRegistry {
        delete(sectionName: string, key: string): void;
        deleteAll(): void;
        getAllKeys(): string[];
        getKeysInSection(sectionName: string): string[];
        read<T = unknown>(sectionName: string, key: string): T;
        readAll(): Record<string, JsonData>;
        write(sectionName: string, key: string, value: any): void;
        writeAll(data: Record<string, JsonData>): void;
    }
    Index

    Methods

    • Deletes a key from the registry.

      Parameters

      • sectionName: string

        The section name.

      • key: string

        The key to delete.

      Returns void

    • Deletes all key-value pairs from the registry.

      Returns void

    • Returns all keys in the registry.

      Returns string[]

      An array of keys.

    • Returns all keys in the given section.

      Parameters

      • sectionName: string

        The section name.

      Returns string[]

      An array of keys.

    • Reads a value from the registry.

      Type Parameters

      • T = unknown

      Parameters

      • sectionName: string

        The section name.

      • key: string

        The key to read.

      Returns T

      The value associated with the key.

    • Reads all key-value pairs from the registry.

      Returns Record<string, JsonData>

      A record of all key-value pairs.

    • Writes a value to the registry.

      Parameters

      • sectionName: string

        The section name.

      • key: string

        The key to write.

      • value: any

        The value to write.

      Returns void

    • Writes multiple key-value pairs to the registry.

      Parameters

      • data: Record<string, JsonData>

        The data to write.

      Returns void