mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
init: the first public commit for AFFiNE
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import AWSAttachment from './aws/aws-attachment';
|
||||
|
||||
const PLATFORM_CONFIG = {
|
||||
AWS_S3: 'aws_s3', // key replace with uuid
|
||||
};
|
||||
|
||||
const PLATFORM = {
|
||||
[PLATFORM_CONFIG.AWS_S3]: AWSAttachment,
|
||||
};
|
||||
|
||||
export class RemoteKvService {
|
||||
readonly #case;
|
||||
|
||||
constructor(token?: string, platform = PLATFORM_CONFIG.AWS_S3) {
|
||||
this.#case = new PLATFORM[platform](token);
|
||||
}
|
||||
|
||||
get instance() {
|
||||
return this.#case;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user