unleash-server
Version:
Unleash is an enterprise ready feature toggles service. It provides different strategies for handling feature toggles.
20 lines (19 loc) • 908 B
TypeScript
/// <reference types="node" />
import { Knex } from 'knex';
import { EventEmitter } from 'events';
import { LogProvider } from '../logger';
import { IUserSplash, IUserSplashKey, IUserSplashStore } from '../types/stores/user-splash-store';
export default class UserSplashStore implements IUserSplashStore {
private db;
private logger;
constructor(db: Knex, eventBus: EventEmitter, getLogger: LogProvider);
getAllUserSplashes(userId: number): Promise<IUserSplash[]>;
getSplash(userId: number, splashId: string): Promise<IUserSplash>;
updateSplash(splash: IUserSplash): Promise<IUserSplash>;
delete({ userId, splashId }: IUserSplashKey): Promise<void>;
deleteAll(): Promise<void>;
destroy(): void;
exists({ userId, splashId }: IUserSplashKey): Promise<boolean>;
get({ userId, splashId }: IUserSplashKey): Promise<IUserSplash>;
getAll(): Promise<IUserSplash[]>;
}