mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-14 14:38:35 +09:00
13 lines
461 B
TypeScript
13 lines
461 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
export function classifyKeyType(key: string): string {
|
|
if (key.startsWith('lock:')) return 'lock';
|
|
if (key.startsWith('bluesky:')) return 'bluesky';
|
|
if (key.includes(':session:')) return 'session';
|
|
if (key.includes(':user:')) return 'user';
|
|
if (key.includes(':guild:')) return 'guild';
|
|
if (key.includes(':channel:')) return 'channel';
|
|
if (key.includes(':ratelimit:')) return 'ratelimit';
|
|
return 'other';
|
|
}
|