Skip to content

Commit 6ef7b51

Browse files
committed
feat: update key/value adapter interface by adding "collection" param
AdminForth/1735/kv-adapters-and-storage-s3-com
1 parent 1906e59 commit 6ef7b51

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

adminforth/types/adapters/KeyValueAdapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
*/
66
export interface KeyValueAdapter {
77

8-
get(key: string): Promise<string | null>;
8+
get(key: string, collection?: string): Promise<string | null>;
99

10-
listByPrefix(prefix: string, limit: number): Promise<Record<string, string>[]>;
10+
listByPrefix(prefix: string, limit: number, collection?: string): Promise<Record<string, string>[]>;
1111

12-
set(key: string, value: string, expiresInSeconds?: number): Promise<void>;
12+
set(key: string, value: string, expiresInSeconds?: number, collection?: string): Promise<void>;
1313

14-
delete(key: string): Promise<void>;
14+
delete(key: string, collection?: string): Promise<void>;
1515

1616
}
1717

0 commit comments

Comments
 (0)